单项选择题
You are developing a Windows Presentation Foundation (WPF) application for a travel reservation system
You need to ensure that users can select a range of travel dates.
What should you do ?()
A. Add single DatePicker control to the design surface
B. Add single Calendar control to the design surface
C. Add single MediaElement control to the design surface to display a calendar
D. Add the appropriate Windows Forms references to the project references. Add a single Windows Forms DateTimePicker control to the design surface
相关考题
-
单项选择题
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You create a Button control for the application. You need to ensure that the application meets the following requirements: When the mouse pointer is over the Button control, the background color of the button is set to red and the Button control appears bigger. When the mouse pointer is not over the Button control, the button returns to its original state. What should you do?()
A. Create a template. Declare a VisualState element in the template.
B. Create a StoryBoard animation. Add an EventTrigger class to the Button control that begins the StoryBoard animation.
C. Create a ScaleTransform class. Bind the ScaleX and ScaleY properties of the Button control to the Background property by using a custom value converter.
D. Add a method named ChangeAppearance in the code-behind file. Subscribe the ChangeAppearance method to the MouseEnter event of the Button control. -
单项选择题
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.
