单项选择题

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application that displays an image.
You need to ensure that users can stretch and scale the image. 
Which control should you use?()

A. Frame
B. Slider
C. Viewbox
D. ScrollViewer


您可能感兴趣的试卷

你可能感兴趣的试题

2.单项选择题

You use Microsoft .NET Framework 4 to create a Windows Forms application.
You write the following code segment. (Line numbers are included for reference only.)
01sealed class FormSettings :

You need to ensure that the first time each user opens the application, a text field displays the following message: "Please enter your setting."
Which code segment should you insert at line 03?()

A. [UserScopedSetting()] [DefaultSettingValue("Please enter your setting.")]
B. [UserScopedSetting()] [SettingsDescription("Description: Please enter your setting.")]
C. [ApplicationScopedSetting()] [DefaultSettingValue("Please enter your setting.")]
D. [ApplicationScopedSetting()] [SettingsDescription("Description: Please enter your setting.")]

4.单项选择题

You use Microsoft .NET Framework 4 to create a Windows Forms application. 
You plan to use a Windows Presentation Foundation (WPF) control of the UserControl1 type hosted in an
ElementHost control named elementHost1. 
You write the following code segment. (Line numbers are included for reference only.)

You need to ensure that the application changes the background color of the hosted control when the background color of the form changes.  
Which code segment should you insert at line 05?()

A. elementHost1.PropertyMap.Remove("BackColor");   elementHost1.PropertyMap.Add("BackColor", new PropertyTranslator(OnBackColorChange));
B. elementHost1.PropertyMap.Remove("Background");   elementHost1.PropertyMap.Add("Background", new PropertyTranslator(OnBackColorChange));
C. elementHost1.PropertyMap.Add("BackColor", new PropertyTranslator(OnBackColorChange));   elementHost1.PropertyMap.Apply("BackColor");
D. elementHost1.PropertyMap.Add("Background", new PropertyTranslator(OnBackColorChange));   elementHost1.PropertyMap.Apply("Background");

7.单项选择题

You create a Windows client application by using Windows Presentation Foundation (WPF). 
The application contains the following code fragment. 

You need to assign lbDetails to use the detail data template when btnDetails is clicked. 
Which code segment should you write for the click event handler for btnDetails?()

A. lbDetails.ItemsPanel.FindName("detail",lbDetails);
B. var tmpl = (ControlTemplate)FindResource("detail"); lbDetails.Template = tmpl; 
C. var tmpl = (DataTemplate)FindName("detail"); lbDetails.ItemTemplate = tmpl;
D. var tmpl = (DataTemplate)FindResource("detail"); lbDetails.ItemTemplate=tmpl;

8.单项选择题


You have definded a style in app.xaml
You want to use this style in your application in code behind.
How can you achieve this? ()

A. button1.Style = FindName("A") as Style
B. button1.Style = FindName("B") as Style
C. button1.Style = FindResource("A") as Style
D. button1.Style = FindResource("B") as Style

10.单项选择题Where can you check the value of a dependency property? ()

A. WPF visualizer
B. in locals
C. WPF tree visualizer

最新试题

You are developing a Windows Forms application that contains a DataGridView control. The DataGridView capture the customer's name, address, and phone number.You have been asked to provide data validation in a DataGridView to prevent users from leaving the..You need to ensure that users cannot tab out of the name field without entering dataWhat should you do ?()

题型:单项选择题

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?()

题型:单项选择题

You create a Windows client application by using Windows Presentation Foundation (WPF). The application contains the following code fragment. You need to assign lbDetails to use the detail data template when btnDetails is clicked. Which code segment should you write for the click event handler for btnDetails?()

题型:单项选择题

You are developing a Windows Presentation Foundation (WPF) application that display pricing and inventory.List box's ItemsSource property has decimal and string types. Decimals represent price and strings represents the folowing markup is defined as follows.You need to ensure that data templates are used to format the strings without changes and the decimals as ..Which markup segment should you insert at line 05 ?()

题型:单项选择题

You use Microsoft .NET Framework 4 to create a Windows Forms application.You write the following code segment. (Line numbers are included for reference only.)01sealed class FormSettings :You need to ensure that the first time each user opens the application, a text field displays the following message: "Please enter your setting."Which code segment should you insert at line 03?()

题型:单项选择题

You are developing a Windows Presentation Foundation (WPF) application. You need to use XAML to create a custom control that contains two Button controls.From which base class should you inherit? ()

题型:单项选择题

You upgrade a Windows Forms application to Microsoft .NET Framework 4. The application was developedby using a previous version of the .NET Framework. The application uses the Code Access Security (CAS) policy for file access. When the application is executed, you receive the following exception:  "NotSupportedException: This method uses CAS policy, which has been obsoleted by the .NET Framework." You need to resolve the error. What should you do?()

题型:单项选择题

You are developing a user control for Windows Presentation Foundation (WPF) application.The user control contains a button. Both the user control and the hosting control must receive the button click event.You need to ensure that the user control responsd to the button click event before hosting control responds to the event.What should you do ?()

题型:单项选择题

You have a custom button, with should have a Property "IsActive", one must be able to bind this Property on a class Property.()

题型:单项选择题

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.  The application displays a list of books. You write the following code fragment. (Line numbers are included for reference only.)You need to ensure that book titles that are out of stock appear in red.Which code fragment should you insert at line 12?()

题型:单项选择题