Question: You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You create a custom control named Wheel. You need to ensure that the Speed property of Wheel can be animated. What should you do?
- Inherit the DependencyObject class.
- Declare the Speed property as a dependency property.
- Declare an animation of the Speed property from within the code-behind file.
- Implement the System.Windows.Media.Animation.IAnimatable interface with the Wheel class.
Correct Answer: 2
Question: You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You add a property named ServiceContext to a control. You need the value of ServiceContext to flow to the child controls exactly like the value of the DataContext property of the FrameworkElement class. What should you do?
- Inherit the control class from the DependencyObject class.
-
- Register a dependency property.
- In the options settings of the property metadata, specify the Inherits option.
-
- Declare a new property.
- In the get and set methods of the new property, create an instance of the TraversalRequest class.
-
- Declare a new property.
- In the get method of the new property call VisualTreeHelper.GetParent. “In the set method of the new property, call VisualTreeHelper.GetChild.
Correct Answer: 2
Question: You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You plan to implement a test strategy for the application. You need to ensure that the test strategy meets the following requirements:
- Test data can be added to the test project without recompiling.
- Multiple variations of a test can be executed at run time.
What should you do?
- Use IntelliTrace.
- Use data-driven tests.
- Create a single test class.
- Create a test method for each data variation.
Correct Answer: 2
Question: You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application includes a function that is triggered by filling out a form and by clicking a button. Currently, the application is tested manually. You need to create an automated and iterative process to test the application. What should you do?
- Use IntelliTrace.
- Use UISpy.exe to extract the user interface (UI) information. Then, use MSTest.exe.
- Use classes in the System.Windows.Automation and System.Windows.Automation.Text namespaces.
- Use the Action Recording methodology to record the user interface (UI) actions.
- Then, use MSTest.exe.
Correct Answer: 3
Question: 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?
- Use the Local Window.
- Use the WPF Visualizer.
- Generate a trace log by using IntelliTrace.
- Set a breakpoint at the control. Run the application.
Correct Answer: 2