Free Microsoft 70-511 Practice Test & Real Exam Questions
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You add a custom command as a resource. The key of the command is saveCommand.
You write the following code fragment. (Line numbers are included for reference only.)
01 < Canvas>
02
03 <Button>
04
05 </Bucton>
06 </Canvas>
You need to ensure that saveCommand is executed when the user clicks the Button control.
What should you do?
You add a custom command as a resource. The key of the command is saveCommand.
You write the following code fragment. (Line numbers are included for reference only.)
01 < Canvas>
02
03 <Button>
04
05 </Bucton>
06 </Canvas>
You need to ensure that saveCommand is executed when the user clicks the Button control.
What should you do?
Correct Answer: C
Vote an answer
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: C
Vote an answer
You are developing a Windows Presentation Foundation (WPF) application.
A user control responds to a click event. The click event handler sets the Handled property to True.
You need to ensure that a parent control responds to the event after the user control's handler executes.
What should you do?
A user control responds to a click event. The click event handler sets the Handled property to True.
You need to ensure that a parent control responds to the event after the user control's handler executes.
What should you do?
Correct Answer: A
Vote an answer
Explanation: Only visible for Pass4Leader members. You can sign-up / login (it's free).
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You write the following code fragment.

You need to implement the MyProject.MyConverter class.
What should you do?
You write the following code fragment.

You need to implement the MyProject.MyConverter class.
What should you do?
Correct Answer: B
Vote an answer
DRAG DROP
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
The application contains a window named Window1. Window1 contains several controls of the Label, TextBox, and Button types. You create the following style in a Window.Resources element:

You need to define a style named Style2 that meets the following requirements:
Has a blue background
Uses the same settings as Style1
Can only be applied to the TextBox controls
How should you complete the style? (To answer, drag the appropriate elements to the correct locations. Each element may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
---

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
The application contains a window named Window1. Window1 contains several controls of the Label, TextBox, and Button types. You create the following style in a Window.Resources element:

You need to define a style named Style2 that meets the following requirements:
Has a blue background
Uses the same settings as Style1
Can only be applied to the TextBox controls
How should you complete the style? (To answer, drag the appropriate elements to the correct locations. Each element may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
---

Correct Answer:

You are developing a Windows Presentation Foundation (WPF) application.
A custom control has a dependency property that is bound to a property of type Intl6 on a business layer object.
You need to ensure that the bound value always falls within the range of an Int16 value, even if the value that the user enters does not.
What should you do?
A custom control has a dependency property that is bound to a property of type Intl6 on a business layer object.
You need to ensure that the bound value always falls within the range of an Int16 value, even if the value that the user enters does not.
What should you do?
Correct Answer: A
Vote an answer
You are developing a Windows Presentation Foundation (WPF) application. You are writing data templates for a calendar.
You must use the Weekend template for weekends and the Weekday template for weekdays. The Window markup is as follows. (Line numbers are included for reference only.)

You need to ensure that the Weekend and Weekday templates are applied correctly to the ListBox control.
Which markup segment should you insert at line 11?
You must use the Weekend template for weekends and the Weekday template for weekdays. The Window markup is as follows. (Line numbers are included for reference only.)

You need to ensure that the Weekend and Weekday templates are applied correctly to the ListBox control.
Which markup segment should you insert at line 11?
Correct Answer: D
Vote an answer
You are developing a Windows Presentation Foundation (WPF) application. You use the following markup segment to add a Button control to the design surface of the MainWindow.xaml file.

You add the following code segment to the code-behind file for MainWindow.

The application will be deployed in an environment that requires alternate key mappings.
You need to remove the CTRL+ C input gesture and replace it with the ALT+ C input
gesture.
What should you do?


You add the following code segment to the code-behind file for MainWindow.

The application will be deployed in an environment that requires alternate key mappings.
You need to remove the CTRL+ C input gesture and replace it with the ALT+ C input
gesture.
What should you do?

Correct Answer: B
Vote an answer
You are developing a Windows Presentation Foundation (WPF) application. The application contains a converter named DateOutputConverter that formats dates.
The window is defined as follows. (Line numbers are included for reference only.)

The window must display the OrderDate value found in shippedOrder. The text box must display the OrderDate formatted by the DateOutputConverter.
You need to ensure that the OrderDate is displayed and formatted correctly.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
The window is defined as follows. (Line numbers are included for reference only.)

The window must display the OrderDate value found in shippedOrder. The text box must display the OrderDate formatted by the DateOutputConverter.
You need to ensure that the OrderDate is displayed and formatted correctly.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
Correct Answer: C,D
Vote an answer
