单项选择题
You are developing a Windows Presentation Foundation (WPF) application.
An event triggers a workflow such that a parent control executes the event handlers before the child controls.
You need to ensure that if a parent controls event handler encounters an error, the subsequent handlers are not called.
What should you do?()
A. Use handlers for a tunneling routed event and mark the event as handled in the case of a problem.
B. Use handlers for a tunneling routed event and make the event as handled in the finally portion of a try-catch-finally code block.
C. Use handlers for a bubbling routed event and mark the event as handled in the case of a problem.
D. Use handlers for a bubbling routed event and set the Handled property of the RoutedEventArgs object to true in the catch portion of a try-catch-finally code block.
相关考题
-
单项选择题
You are developing a Windows Presentation Foundation (WPF) application to play audio files. You add MediaElement mediaElement1 and a Button control named btnPlayAudio to the design surface. The MediaElement co.. audio file. The LoadedBehavior attribute is set to Manual. You add the following code to the main Window. You set the command of the button to MediaCommands.Play. You need to ensure that the application will play the audio file when the button is pressed. What should you add to constructor of the main window ?()
A.
B.
C.
D. -
单项选择题
You are developing a Windows Presentation Foundation (WPF) application The application is for commercial use and requires a valid license key to be entered. You create a project type of Class Library code to validate license keys You need to ensure that the user enters a valid license key during installation of the software. Which deployment should reference the class library?()
A. Click Once
B. Setup Project
C. XBAP
D. XCopy -
单项选择题
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. AutomationElementIdentifier
B. AutomationPeer
C. Keyboard
D. UICues
