Microsoft TS: Windows Applications Development with Microsoft .NET Framework 4 - 70-511 Exam Practice Test
You use Microsoft .NET Framework 4 to create a custom Windows Presentation Foundation (WPF) application.
Your environment includes several WPF applications. The applications use the same logo and style configuration as part of a corporate standard.
You need to ensure that the existing applications can be updated to use the same logo and style settings without recompiling.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
Your environment includes several WPF applications. The applications use the same logo and style configuration as part of a corporate standard.
You need to ensure that the existing applications can be updated to use the same logo and style settings without recompiling.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
Correct Answer: A,E
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.)

You need to ensure that both Button controls display the "Save" text.
Which code fragment should you insert at line 06?

You need to ensure that both Button controls display the "Save" text.
Which code fragment should you insert at line 06?
Correct Answer: D
You are migrating a Windows Forms application to a Windows Presentation Foundation (WPF) application.
You need to create a window to display controls. The controls must be positioned by using fixed coordinates.
Which control should you use in the WPF application?
You need to create a window to display controls. The controls must be positioned by using fixed coordinates.
Which control should you use in the WPF application?
Correct Answer: B
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application contains a form named frmMain that contains a button named btnSave.
You create a ProgressBar control named saveProgress. Initially, saveProgress is not displayed on frmMain.
When a user clicks btnSave, you have the following requirements:
- saveProgress is slightly visible after 0.2 seconds
- saveProgress is fully visible after 1 second
You need to declare the corresponding storyboard.
You write the following code fragment. (Line numbers are included for reference only.)
01 <Storyboard x:Key="animateProgress" TargetName="saveProgress">
03 </Storyboard>
Which code fragment should you insert at line 02 to complete the declaration?
You create a ProgressBar control named saveProgress. Initially, saveProgress is not displayed on frmMain.
When a user clicks btnSave, you have the following requirements:
- saveProgress is slightly visible after 0.2 seconds
- saveProgress is fully visible after 1 second
You need to declare the corresponding storyboard.
You write the following code fragment. (Line numbers are included for reference only.)
01 <Storyboard x:Key="animateProgress" TargetName="saveProgress">
03 </Storyboard>
Which code fragment should you insert at line 02 to complete the declaration?
Correct Answer: C
You are developing a Windows Presentation Foundation (WPF) application. All of the application styles are in a file named Themes.dll. You have the following markup segment.
<Border Style="{StaticResource BlueBackground)" Height="100" Width="200"> </Border>
BlueBackground is defined in a XAML file named BlueTheme.xaml. The XAML markup is compiled into the Themes.dll file.
You need to ensure that the XAML file is referenced so that the application can apply the settings in the BlueBackground style.
What should you do?
<Border Style="{StaticResource BlueBackground)" Height="100" Width="200"> </Border>
BlueBackground is defined in a XAML file named BlueTheme.xaml. The XAML markup is compiled into the Themes.dll file.
You need to ensure that the XAML file is referenced so that the application can apply the settings in the BlueBackground style.
What should you do?
Correct Answer: C
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
The application uses the drag-and-drop functionality.
You need to identify which enumeration member must be used to meet the following requirements:
Ensure that the data from the drag source can be copied.
Ensure that the data from the drag source can be moved.
Ensure that the target can be scrolled while you are dragging.
Which enumeration member should you identify?
The application uses the drag-and-drop functionality.
You need to identify which enumeration member must be used to meet the following requirements:
Ensure that the data from the drag source can be copied.
Ensure that the data from the drag source can be moved.
Ensure that the target can be scrolled while you are dragging.
Which enumeration member should you identify?
Correct Answer: D
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application contains the following code fragment.
<StackPanel>
<TextBlock Style="{StaticResource HyStyle)">Hello World</TextBlock>
<Button Style="{StaticResource HyStyle}">Ok</Button>
</StackPonel>
You need to define a style that applies the following properties to the text in the StackPanel object:
- FontSize = 32
- FontWeight = Bold
Which code fragment should you use?
<StackPanel>
<TextBlock Style="{StaticResource HyStyle)">Hello World</TextBlock>
<Button Style="{StaticResource HyStyle}">Ok</Button>
</StackPonel>
You need to define a style that applies the following properties to the text in the StackPanel object:
- FontSize = 32
- FontWeight = Bold
Which code fragment should you use?
Correct Answer: C
You are developing a Windows Presentation Foundation (WPF) application. You add a TextBox control to the design surface and bind it to an underlying window resource named dsGiftCertificate. The control uses the binding XAML as follows.
<Binding Source="{StaticResource dsGiftCertificate}"
UpdateSourceTrigger="LostFocus" Path="Coupon" />
You need to provide a custom error message in the tooltip of the TextBox when the user leaves the textbox.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
<Binding Source="{StaticResource dsGiftCertificate}"
UpdateSourceTrigger="LostFocus" Path="Coupon" />
You need to provide a custom error message in the tooltip of the TextBox when the user leaves the textbox.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
Correct Answer: A,B
You are developing a Windows Presentation Foundation (WPF) application that contains a custom Button control.
The custom Button control can be set as active by setting an IsActive property to true. You need to ensure that the IsActive property can be bound to a business object.
What should you do on the custom Button control?
The custom Button control can be set as active by setting an IsActive property to true. You need to ensure that the IsActive property can be bound to a business object.
What should you do on the custom Button control?
Correct Answer: D
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application displays a list of books.
You write the following code fragment. (Line numbers are included for reference only.)

You need to ensure that book titles that are out of stock appear in red.
Which code fragment should you insert at line 12?
You write the following code fragment. (Line numbers are included for reference only.)

You need to ensure that book titles that are out of stock appear in red.
Which code fragment should you insert at line 12?
Correct Answer: D
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application contains a formnamed frmMain that contains a button named btnSave.
You create a ProgressBar control named saveProgress. Initially, saveProgress is not displayed on frmMain.
When a user clicks btnSave, you have the following requirement:
saveProgress is fully visible after l second
You need to declare the corresponding storyboard.
You write the following code fragment. (Line numbers are included for reference only.)
01 <Storyfooard x:Key="animateProgre3sn TargetName="3aveProgressn>
03 </Storyboard>
Which code fragment should you insert at line 02 to complete the declaration?

You create a ProgressBar control named saveProgress. Initially, saveProgress is not displayed on frmMain.
When a user clicks btnSave, you have the following requirement:
saveProgress is fully visible after l second
You need to declare the corresponding storyboard.
You write the following code fragment. (Line numbers are included for reference only.)
01 <Storyfooard x:Key="animateProgre3sn TargetName="3aveProgressn>
03 </Storyboard>
Which code fragment should you insert at line 02 to complete the declaration?

Correct Answer: A