2014 Latest 100% Pass Guaranteed Microsoft 70-511 Practice Tests (61-70)

QUESTION 61
You are developing a Windows Presentation Foundation (WPF) application. The application contains the following code in the code-behind file for an application window. (Line numbers are included for reference only.)
01 StackPanel stack = new StackPanel () ;
02 Content = stack;
03 for (int i=0; i<10; i++)
04 {
05 Button btn = new Buttonf();
06 btn.Name = ((char) (‘A’ + i)) .ToString ();
07 btn.Content = btn.Name + “says ‘Click me’ “;
08
09 }
You need to ensure that all of the Button controls that are defined in this code segment appear in the application window.
Which code segment should you insert at line 08?

A.    stack.Children.Add(btn);
B.    stack.Children.Insert (i + 1, btn);
C.    Content = btn;
D.    Content = new Button() { Name = {‘A’ + i) . ToString() Content = (i + ” says ‘Click me’ “).ToString()};

Answer: A

QUESTION 62
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You create a window that contains a Button control and a MenuItem control. Both controls are labeled “Add sugar.” The Command properties of the Button and MenuItem controls are set to the same RoutedCommand named AddSugarCommand.
You write the following code segment.
private void CanAddSugar (object sender, CanExecuteRoutedEventArgs e) { … }
You need to ensure that when the CanAddSugar method sets e.CanExecute to false, the MenuItem and Button controls are disabled.
What should you do?

A.    Create an event handler for the CanExecuteChanged event of the AddSugarCommand command.
Call the CanAddSugar method from within the event handler.
B.    Inherit the AddSugarCommand from the RoutedUICommand class instead of the RoutedCommand class.
Call the CanAddSugar method from within the constructor of the AddSugarCommand command.
C.    Add a CommandBinding object to the CommandBinding property of the MenuItem control.
Set the CanExecute property of the CommandBinding object to the CanAddSugar method.
D.    Add a CommandBinding object to the CommandBindings property of the window.
Set the Command property of CommandBinding to the AddSugarCommand command.
Set the CanExecute property of the CommandBinding object to the CanAddSugar method.

Answer: D

QUESTION 63
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You write the following code fragment. (Line numbers are included for reference only.)

image
You need to ensure that a video file begins to play only when a user clicks Play.
Which code fragment should you insert at line 06?

A.    < MediaElement Source=”media\ numbers.TJTOV” Name=”myMediaElement” Width=”450″ Height=”250″
LoadedBehavior=”Play” UnloadedBehavior=”Stop” Stretch=”Fill’>
B.    < MediaElement Source=”media\numbers.wmv” Name=”myMediaElement” Width=”450″ Height=”250″
LoadedBehavior=”Manual” UnloadedBehavior-“Stop” Stretch-Till”/>
C.    < MediaPlayer Source=”media\ numbers, umv” Naitie=”myMediaElement” Width=”450″ Helght=”250″
LoadedBehavior=”Play” UnloadedBehavior=”Stop” Stretch=”Fill”/ >
D.    < MediaPlayer Source=”media\numbers.wmv” Name=”myMediaElement” Width=”450″ Height=”250″
LoadedBehavior=”Manual” UnloadedBehavior=”Stop” Stretch=”Fill”/ >

Answer: B

QUESTION 64
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You create a Button control for the application.
You need to ensure that the application meets the following requirements:
– When the mouse pointer is over the Button control, the background color of the button is set to red and the Button control appears bigger.
– When the mouse pointer is not over the Button control, the button returns to its original state.
What should you do?

A.    Create a template. Declare a VisualState element in the template.
B.    Create a StoryBoard animation.
Add an EventTrigger class to the Button control that begins the StoryBoard animation.
C.    Create a ScaleTransform class.
Bind the ScaleX and ScaleY properties of the Button control to the Background property by using a custom
value converter.
D.    Add a method named ChangeAppearance in the code-behind file.
Subscribe the ChangeAppearance method to the MouseEnter event of the Button control,

Answer: A

QUESTION 65
You are developing a Windows Presentation Foundation (WPF) application. You need to display HTML content from a Web page on the WPF form.
What should you do?

A.    Add a FlowDocumentReader control to the design surface.
Then create a FlowDocument control.
B.    Add a DocumentViewer control to the design surface.
Then create a FixedDocument control.
C.    Add a WebBrowser control to the design surface.
Then use the Navigate method to navigate the URI object.
D.    Add a ContentControl control to the design surface.
Then reference a WebClient object to return an HTML string.

Answer: C

QUESTION 66
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You need to ensure that the application meets the following requirements;
– Displays a menu that is specific to the control selected by the user.
– Displays the menu next to the control.
Which control should you use?

A.    Menu
B.    PopUp
C.    ListBox
D.    ContextMenu

Answer: D

QUESTION 67
You create a Microsoft Windows Installer file for a Windows Presentation Foundation (WPF) application that requires Microsoft .NET Framework 4. You need to ensure that the installation starts only if .NET Framework 4 is already installed on the computer.
What should you do?

A.    Use a custom action.
B.    Set the MinVersion property to .NET Framework 4.
C.    Set the Version property of Windows Installer to .NET Framework 4.
D.    Set the Version property of the Launch Condition to .NET Framework 4.

Answer: D

QUESTION 68
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application named MyApp.exe. You use Microsoft Windows Installer to package the application.
You create an icon file named Application.ico.
You need to associate Application.ico with MyApp.exe when MyApp.exe is deployed.
What should you do?

A.    Use the File Types Editor tool.
B.    Rename the icon file to MyApp.exe.ico.
C.    Set the AddRemoveProgramsIcon property to Application.ico.
D.    Use the File System Editor tool to set the Icon property to Application.ico.

Answer: D

QUESTION 69
You are developing a Windows Presentation Foundation (WPF) application. You are implementing a test strategy for the application. You need to ensure that the test class can repeat user input. From which base class should the test class inherit?

A.    AutomationElementldentifier
B.    AutomationPeer
C.    Keyboard
D.    UlCues

Answer: B

QUESTION 70
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application
You discover that when the application runs, a user control is not rendered correctly. You need to find out the user interface (UI) element of the window that is causing the rendering problem.
What should you do?

A.    Use the Local Window.
B.    Use the WPF Visualizer.
C.    Generate a trace log by using IntelliTrace.
D.    Set a breakpoint at the control. Run the application.

Answer: A

If you want to pass Microsoft 70-511 successfully, donot missing to read latest lead2pass Microsoft 70-511 exam questions.
If you can master all lead2pass questions you will able to pass 100% guaranteed.

http://www.lead2pass.com/70-511.html

         

Why Choose Lead2pass?

If you want to pass the exam successfully in first attempt you have to choose the best IT study material provider, in my opinion, Lead2pass is one of the best way to prepare for the exam.

Lead2pass Testking Pass4sure Actualtests Others
$99.99 $124.99 $125.99 $189 $29.99-$49.99
Up-to-Dated
Real Questions
Error Correction
Printable PDF
Premium VCE
VCE Simulator
One Time Purchase
Instant Download
Unlimited Install
100% Pass Guarantee
100% Money Back