You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You create a window in the application. You plan to select a layout control to host the elements that you add to the window.
You need to select a control that meets the following requirements with its default properties:
1. The elements stretch horizontally to occupy the available width of the window.
2. The elements do not stretch vertically.
Which control should you use?
You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You write the following XAML code fragment.
(Line numbers are included for reference only.)
01
02
03
06
07 ...
08
You add three buttons to the StackPanel control. You need to ensure that the following requirements are met:
The background color of each button turns green when the user moves the mouse pointer over the button.
The background color of each button turns red when the user moves the mouse pointer away from the
button.
What should you do?
You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
The application will be translated into several languages. A TextArea control in the application contains text that will be translated. You need to add a comment for the person who will be translating the text.
What should you do?
You are converting a Windows Forms application to a Windows Presentation Foundation (WPF) application.
You use Microsoft .NET Framework 3.5 to create the WPF application.
The WPF application will reuse 30 forms of the Windows Forms application. The WPF application contains the following class definition.
public class OwnerWindow : System.Windows.Forms.IWin32Window
{
private IntPtr handle_Renamed;
public IntPtr Handle
{
get { return handle_Renamed ; }
set { handle_Renamed = value ; }
}
}
You write the following code segment in the WPF application.
(Line numbers are included for reference only.)
01 public System.Windows.Forms.DialogResult LaunchWindowsFormsDialog
(System.Windows.Forms.Form dialog, Window wpfParent)
02 {
03 System.Windows.Interop.WindowInteropHelper helper = new
System.Windows.Interop.WindowInteropHelper(wpfParent) ;
04 OwnerWindow owner = new OwnerWindow() ;
05
06 }
You need to ensure that the application can launch the reusable forms as modal dialogs.
Which code segment should you insert at line 05?
You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You are creating an XAML page for the application. The page will display information about cars. The information is stored in a static resource named cars. You need to ensure that the page can display the image of each car in a ListBox control.
Which XAML code fragment should you use?
You create a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You perform the following two tasks:
Use a digital certificate that is generated by an internal certificate authority (CA) to sign the application.
Store the application files on a central Web site.
You instruct the users to access the Web site and start the application by using the ClickOnce technology. The users report that their attempts to start the application fail.
You need to ensure that the users can use the application.
What should you do?
You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You write the following code fragment.
(Line numbers are included for reference only.)
01
02
03
04
05 Material="{StaticResource 07 Material}" />
06
07
08
You need to display a triangle
Which code fragment should you insert at line 03?
You are converting a Windows Forms application to a Windows Presentation Foundation (WPF) application.
You use Microsoft .NET Framework 3.5 to create the WPF application.
The WPF application will reuse 30 forms of the Windows Forms application. The WPF application contains the following class definition.
public class OwnerWindow : System.Windows.Forms.IWin32Window
{
private IntPtr handle_Renamed;
public IntPtr Handle
{
get { return handle_Renamed ; }
set { handle_Renamed = value ; }
}
}
You write the following code segment in the WPF application.
(Line numbers are included for reference only.)
01 public System.Windows.Forms.DialogResult LaunchWindowsFormsDialog
(System.Windows.Forms.Form dialog, Window wpfParent)
02 {
03 System.Windows.Interop.WindowInteropHelper helper = new
System.Windows.Interop.WindowInteropHelper(wpfParent) ;
04 OwnerWindow owner = new OwnerWindow() ;
05
06 }
You need to ensure that the application can launch the reusable forms as modal dialogs.
Which code segment should you insert at line 05?
You are creating a Windows Presentation Foundation application. You create a window for the application.
The application contains an audio file named AudioFileToPlay.wav.
You need to ensure that the following requirements are met:
The audio file is played each time you click the client area of the window.
The window provides optimal performance when the audio file is being played.
What should you do?
You deploy a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
Users use Microsoft Windows Internet Explorer to launch the application. The application uses an XML file to persist user information. The XML file is used by multiple assemblies within the application. The company
security policy requires that each user has a separate copy of the XML file. During testing, you discover that the application can persist information to the XML file on the development computer but not on the client
computers. You need to ensure that the application can persist information to the XML file on all the client computers. You also need to ensure that the application maintains the required security level.
What should you do?