PrepAway - Latest Free Exam Questions & Answers

Author: admin

Which code segment should you use?

You are creating a Windows Presentation Foundation (WPF) application by using Microsoft .NET Framework 3.5.
You plan to implement a search functionality for a text editor. You write the following code segment for the WPF screen.

<DockPanel>
<WrapPanel DockPanel.Dock="Top">
<TextBox Name="tbxTextToFind" Width="200" />
<Button Name="btnFind" Width="80" Click="btnFind_Click">Find</Button>
</WrapPanel>
<RichTextBox Name="rtbText" />
</DockPanel>

You need to ensure that on clicking the Find button, the value of the tbxTextToFind text box is selected in the rtbText control.
Which code segment should you use?

Which two actions should you perform?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You create a dialog window composed of a TextBox control and a Button control by using the following XAML code fragment.

<TextBox Width="200" AcceptsReturn="True" />
<Button Width="80" Click="Button_Click">OK</Button>

You need to ensure that each time the user presses the ENTER key, the click event of the OK button is raised.
Which two actions should you perform? (Each correct answer presents part of the solution.)

Which control should you use?

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?

Which code segment should you insert at line 05?

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?

Which ListBox control would you use?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You create a window for the application. You need to ensure that the following requirements are met:
* An array of strings is displayed by using a ListBox control in a two-column format.
* The data in the ListBox control flows from left to right and from top to bottom.
Which ListBox control would you use?

what action should you perform to achieve the goal?

You work as the network administrator at ESL, Ltd. You manage a server that runs Window 2008, and the server has the Hyper-V server role installed Current, all users and computers on your network are members of a single Active Directory Domain Service (AD DS) domain. The company requires you to provide a non-administrative user named User 1 permissions to remotely connect to the server by using Hyper-V Manager. Then what action should you perform to achieve the goal?

which command should you run on the server?

You work as the network administrator at ESL, Ltd. You mange a server that has a Server Core installation of Window Server 2008, and server has the Hyper-V server role installed. Now you must ensure that you can launch Hyper-V Manager from a client computer that runs Windows Vista Server Pack 1 (SP1) for x64-based systems and connect to the server. So which command should you run on the server?