单项选择题
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;
相关考题
-
单项选择题
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 -
单项选择题
You have a custom button, with should have a Property "IsActive", one must be able to bind this Property on a class Property.()
A. Dependency Property
B. INotifyPropertyChanged
C. net Property -
单项选择题
Where can you check the value of a dependency property? ()
A. WPF visualizer
B. in locals
C. WPF tree visualizer
