myImage.jpg in a folder named MyFolder in another assembly named myAssembly?
Which of the following examples of the pack URI syntax accesses a file named
myImage.jpg in a folder named MyFolder in another assembly named myAssembly?
What should you do?
A Windows Communication Foundation (WCF) solution exposes the following contract over an HTTP connection.
[ServiceContract]
public interface IDataService
{
[OperationContract]
string GetData();
}
Existing clients are making blocking calls to GetData. Calls to GetData take five seconds to complete.
You need to allow new clients to issue non-blocking calls to get the data, without breaking any existing clients. What should you do?
which base class should you inherit?
You are developing a Windows Presentation Foundation (WPF) application. You need to use XAML to create a custom control that contains two Button controls. From which base class should you inherit?
Which of the following options are TRUE?
You use Microsoft .Net Framework 4 to create a Windows Form application.
You created a new application, you then wrote the code below:
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture
Which of the following options are TRUE?
What are two possible ways to achieve this goal?
A Windows Communication Foundation (WCF) solution uses the following contracts.
(Line numbers are included for reference only.)
01 [ServiceContract(CallbackContract=typeof(INameService))]
02 public interface IGreetingService
03 {
04 [OperationContract]
05 string GetMessage();
06 }
07
08 [ServiceContract]
09 public interface INameService
10 {
11 [OperationContract]
12 string GetName();
13 }
When the client calls GetMessage on the service interface, the service calls GetName on the client callback.
In the client, the class NameService implements the callback contract. The client channel is created as follows:
22 InstanceContext callbackContext = new InstanceContext(new NameService(“client”));
23 …
24 …
25 DuplexChannelFactory<IGreetingService> factory = new DuplexChannelFactory<IGreetingService>(typeof(NameService), binding, address);
26 IGreetingService greetingService = factory.CreateChannel();
You need to ensure that the service callback is processed by the instance of NameService.
What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
What should you do ?
You are developing a Windows Presentation Foundation (WPF) application.
The application contains stylized body text and heading text. The heading text is a slight variation of the body text.
You need to ensure that if the body text changes, the heading text automatically inherits those changes.
What should you do ?
What should you do ?
You are developing a user control for Windows Presentation Foundation (WPF) application.
The user control contains a button. Both the user control and the hosting control must receive the button click event.
You need to ensure that the user control responsd to the button click event before hosting control responds to the event.
What should you do ?
Which code segment should you use?
A Windows Communication Foundation (WCF) client configuration file contains the following XML segment in the system.serviceModel element.
<client>
<endpoint address=”net.tcp://server/ContosoService”
binding=”netTcpBinding”
contract=”Contoso.IContosoService”
name=”netTcp”/>
<endpoint address=”net.pipe://localhost/ContosoService”
binding=”netNamedPipeBinding”
contract=”Contoso.IContosoService”
name=”netPipe” />
</client>
You need to create a channel factory that can send messages to the endpoint listening at net.pipe://localhost/ContosoService.
Which code segment should you use?
Which Visual Studio window should you select ?
You are developing a Windows Presentation Foundation (WPF) application.
You configure PresentationTraceSource to track errors in a bound TextBox control in the application.
You need to choose the window that the Trace information is sent to
Which Visual Studio window should you select ?
Which markup segment should you insert at line 05 ?
You are developing a Windows Presentation Foundation (WPF) application that display pricing and inventory.
List box’s ItemsSource property has decimal and string types. Decimals represent price and strings represents the folowing markup is defined as follows.
<Window xmlns:clr=”clr-namespace:System;assembly=mscorlib”>
<ListBox ItemsSource=”{Binding}”>
<ListBox.Resources>
</ListBox.Resources>
</ListBox>
</Window>
You need to ensure that data templates are used to format the strings without changes and the decimals as ..
Which markup segment should you insert at line 05 ?