PrepAway - Latest Free Exam Questions & Answers

Category: 70-511

Exam 70-511: TS: Windows Applications Development with Microsoft .NET Framework 4

What should you do?

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You want to add an audio player that plays .wav or .mp3 files when the user clicks a button.
You plan to store the name of the file to a variable named SoundFilePath.
You need to ensure that when a user clicks the button, the file provided by SoundFilePath plays.
What should you do?

Which code segment should you write for the click event handler for btnDetails?

You create a Windows client application by using Windows Presentation Foundation (WPF).
The application contains the following code fragment.
<Window.Resources>
<DataTemplate x:Key=”detail”>
<!–…–>
</DataTemplate>
</Window.Resources>
<StackPanel>
<ListBox Name=”lbDetails”>
</ListBox>
<Button Name=”btnDetails”>Details</Button>
</StackPanel>
You need to assign lbDetails to use the detail data template when btnDetails is clicked.
Which code segment should you write for the click event handler for btnDetails?

Which code segment should you write in the constructor of the MainWindow class?

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The
application has a window named MainWindow that has a StackPanel control named sp as the root element.
You want to create a Button control that contains a TextBlock control with the “Save” Text property.
You need to create the control dynamically and add the control to sp.
Which code segment should you write in the constructor of the MainWindow class?

What should you do?

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?

Which of the following statments are TRUE ?

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
The application contains a composite user control that includes a TextBox control named txtInput.
The user control will be hosted in a window and will have handlers for the text-changed event of txtInput.
You need to ensure that the application meets the following requirements:

AddHandler(TextBox.TextChangedEvent, new RoutedEventHandler(Audit_TextChanged), true);

Which of the following statments are TRUE ? (choose all that apply)

Which code segment should you use?

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You write the following code fragment.
<StackPanel TextBox.PreviewTextInput=”StackPanel_PreviewTextInput”>
<TextBox Name=”TxtBoxA”/>
<TextBox Name=”TxtBoxB”/>
<TextBox Name=”TxtBoxC”/>
</StackPanel>
You create an event handler named StackPanel_PreviewTextInput. You also have a collection of strings named Keywords.
You need to ensure that TxtBoxA and TxtBoxB do not contain any of the strings in the Keywords collections.
Which code segment should you use?


Page 13 of 13« First...910111213