单项选择题
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 -
单项选择题
You are developing a Windows Presentation Foundation (WPF) application.You need to display HTML content from a Web page on the WPF form. What should you do?()
A. Add a FlowDocumentReader control to the design surface. Then create a FlowDocument control.
B. Add a DocumentViewer control to the design surface. Then create a FixedDocument control.
C. Add a WebBrowser control to the design surface. Then use the Navigate method to navigate the URI object.
D. Add a ContentControl control to the design surface. Then reference a WebClient object to return an HTML string.
