单项选择题
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
The application contains a set of Button controls.
You need to ensure that a button is highlighted when the mouse pointer is located over a button that contains no content.
Which code fragment should you use?()
A.
B.
C.
D.
相关考题
-
单项选择题
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 use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You write the following code fragment. (Line numbers are included for reference only.) You need to ensure that both Button controls display the "Save" text. Which code fragment should you insert at line 06?()
A. <TextBlock Text="{Binding}" />
B. <TextBlock Text="{TemplateBinding Content}" />
C. <ContentPresenter Content="{Binding}" />
D. <ContentPresenter /> -
单项选择题
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application that displays a high-resolution graphic image named Image1.jpg. You need to limit the width of the image to 200 pixels. You also need to preserve the aspect ratio of the image. Which code fragment should you use?()
A. <Image Width="200" Source="Image1.jpg"/> <Image Width="200" Height="200" Source="Image1.jpg"/> <ImageWidth="200"><Image.Source>
B. <BitmapImage DecodePixelWidth="200"DecodePixelHeight="200"UriSource="Image1.jpg" /> </Image.Source>
C. </Image><Image Width="200"><Image.Source>
D. <BitmapImage DecodePixelWidth="200" UriSource="Image1.jpg" /></Image.Source> </Image>
