单项选择题

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;


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题


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

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

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

4.单项选择题

Which of the following examples of the pack URI syntax accesses a file named myImage.jpg in a folder named MyFolder in another assembly named myAssembly? ()

A. Pack://application:,,,/myAssembly;component/MyFolder/myImage.jpg
B. Pack://application:,,,/myAssembly;MyFolder/component/myImage.jpg
C. Pack://application:,,,;component/myAssemby/MyFolder/myImage.jpg
D. Pack://application:,,,/myAssembly;component/myImage.jpg

6.单项选择题

You use Microsoft .Net Framework 4 to create a Windows Form application.
You created a new application, you then wrote the code below:
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture
Which of the following options are TRUE? ()

A. The user interface will make use of the currently configured culture settings in the Control Panel at present.
B. The user interface will make use of new culture settings.
C.The user interface will make use of the culture settings that were installed with the operating system.

7.单项选择题

You are developing a Windows Presentation Foundation (WPF) application.
The application contains stylized body text and heading text. The heading text is a slight variation of the body text.
You need to ensure that if the body text changes, the heading text automatically inherits those changes.
What should you do ?()

A. Set the Value property of the style setter to point to a static resource
B. Set the BasedOn property of the heading style to point to a static resource for the body text style
C. Set the Key property of the heading style to start with the name of the body text style
D. Set the TargetType property of the heading style to TextBlock

9.单项选择题

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

A. Use a bubbling routed event. In the button click event handler, set the Handled property to True
B. Use a bubbling routed event. In the button click event handler, set the Handled property to False
C. Use a standard Microsoft .NET event. Set Handled property to true.
D. Use a tunneling routed event. Set the handled property to false.

最新试题

You use Microsoft .NET Framework 4 to create an application. The application performs resource-intensive calculations that consist of multiple layers of nested looping.The application will be deployed to servers that contain varying hardware configurations. You need to ensure that the application utilizes CPU resources on the server in the most efficient manner. You want to achieve this goal by using the minimum amount of code. What should you do?()

题型:单项选择题

Where can you check the value of a dependency property? ()

题型:单项选择题

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application has a window named MainWindow that has a StackPanel control named sp as the root element. You want to create a Button control that contains a TextBlock control with the "Save" Text property. You need to create the control dynamically and add the control to sp. Which code segment should you write in the constructor of the MainWindow class?()

题型:单项选择题

Which of the following examples of the pack URI syntax accesses a file named myImage.jpg in a folder named MyFolder in another assembly named myAssembly? ()

题型:单项选择题

You use Microsoft .Net Framework 4 to create a Windows Form application.You created a new application, you then wrote the code below:Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCultureWhich of the following options are TRUE? ()

题型:单项选择题

You are developing WPF application for managing student information... btnSort and a DataGrid control named dgStudents on the design surface of the MainWindow.xaml properties : FirstName and LastName. You create the following code segment in the constructor of...The DataGrid control displays the list of students unsorted.You need to ensure that the list of students is sorted by last name.Which code segment should you add to the click event handler of the Button control?()

题型:单项选择题

You need to ensure that phone numbers are displayed in the following format : (###) ### - ###Which markup segment should you use ?()

题型:单项选择题

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

题型:单项选择题

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You need to ensure that users can view content in a book-reading format that displays two pages at a time. Which control should you use?()

题型:单项选择题

You are developing a Windows Presentation Foundation (WPF) application that displays financial data. The following style is applied to every Label control that displays currency.You need to ensure that the style is updated to meet the following requirements regarding currency:- It must be right aligned- It must display the number with the regional currency settingsWhich setting should you use in the application manifest?()

题型:单项选择题