Microsoft
70-511 · Question #170
70-511 Question #170: Real Exam Question with Answer & Explanation
The correct answer is D. Dim playCommand As CoinmandBinding =. See the full explanation below for the reasoning.
Question
You are developing a Windows Presentation Foundation (WPF) application to play audio files. You add a MediaElement control named mediaElementl and a Button control named btnPlayAudio to the design surface. The MediaElement control Source attribute is set to an audio file. The LoadedBehavior attribute is set to Manual. You add the following code to the main window. Sub playCoinroand_Executed (ByVal sender As Object, ByVal e As RoutedEventArgs) MediaElenient 1.Play () End Sub 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 the constructor of the main window?
Options
- ADim piayCommand As RoutedCommand = New RoutedCommand()
- BDim playCommand As RoutedUICommand = New RoutedUICommand()
- CDim playCommand As CoinmandBinding =
- DDim playCommand As CoinmandBinding =
Community Discussion
No community discussion yet for this question.