Implement the INotifyPropertyChanged interface in the Product class.
Implement the INotifyCollectionChanged interface in the ProductList class.
Set the Mode property of the Binding object of the ListBox control to TwoWay.
Set the UpdateSourceTrigger property of the Binding object of the ListBox control to PropertyChanged.
第1题:
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You add a ListBox control to the application. The ListBox control is data-bound to an instance of a custom collection class of the Product objects named ProductList. The number of items of the data-bound collection is fixed. However, users can modify the properties of each of the Product objects in the collection. You need to ensure that changes made on the Product objects are automatically reflected in the ListBox control. What should you do?()
第2题:
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You need to ensure that the application meets the following requirements: Displays a menu that is specific to the control selected by the user. Displays the menu next to the control. Which control should you use? ()
第3题:
You use Microsoft Visual Studio 2010 and Microsoft . NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You create a WPF window in the application. You add the following code segment to the application. public class ViewModel { public CollectionView Data { get; set; } } public class BusinessObject { public string Name { get; set; } } The DataContext property of the window is set to an instance of the ViewModel class. The Data property of the ViewModel instance is initialized with a collection of BusinessObject objects. You add a TextBox control to the Window. You need to bind the Text property of the TextBox control to the Name property of the current item of the CollectionView of the DataContext object. You also need to ensure that when a binding error occurs, the Text property of the TextBox control is set to N/A . Which binding expression should you use?()
第4题:
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You discover that when the application runs, a user control is not rendered correctly. You need to find out the user interface (UI) element of the window that is causing the rendering problem. What should you do?()
第5题:
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application contains a ListBox control named lbxItems that is data-bound to a collection of objects. Each object has a DisplayValue property. You add a Button control to the application. You need to ensure that the Content property of the Button control is data-bound to the DisplayValue property of the selected item of lbxItems. Which binding expression should you use?()
第6题:
You use Microsoft .NET Framework 4 to create a Windows Presentation Framework (WPF) application. You plan to create a custom control that contains four text input fields. Each of the text input fields within the control will contain a label. You need to ensure that the text input fields within the control can be validated by using a regular expression validator. Which class should you inherit from?()
第7题:
{ Binding Path=Data/Name, FallbackValue='N/A' }
{ Binding Path=Data.Name, FallbackValue='N/A' }
{ Binding Path=Data/Name, TargetNullValue='N/A' }
{ Binding Path=Data.Name, TargetNullValue='N/A' }
第8题:
Use a DoubleAnimation class.
Use a Storyboard animation class.
Use the DragDropEffects enumeration.
Use the DragAction enumeration.
第9题:
a user control
a data template
a control template
a control that inherits the Canvas class
第10题:
{ Binding ElementName=lbxItems, Source=SelectedItem, Path=DisplayValue }
{ Binding Source=lbxItems, ElementName=SelectedItem, Path=DisplayValue }
{ Binding ElementName=lbxItems, Path=SelectedItem.DisplayValue }
{ Binding Source=lbxItems, Path=SelectedItem.DisplayValue }
第11题:
Inherit the DependencyObject class.
Declare the Speed property as a dependency property.
Declare an animation of the Speed property from within the code-behind file.
Implement the System.Windows.Media.Animation.IAnimatable interface with the Wheel class.
第12题:
FrameworkElement
UIElement
UserControl
Button
第13题:
You use Microsoft .NET Framework 4 to create a Windows Forms application. The application includes a RichTextBox control and a ListBox control. The ListBox control is populated with a list of valid file names. The application allows users to drag a ListBox item to the RichTextBox control. You need to provide a visual indication that a file that is dragged can be dropped on the RichTextBox control. What should you do?()
第14题:
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. The application has multiple data entry windows. Each window contains controls that allow the user to type different addresses for shipping and mailing. All addresses have the same format. You need to ensure that you can reuse the controls. What should you create?()
第15题:
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You create a custom control named Wheel. You need to ensure that the Speed property of Wheel can be animated. What should you do?()
第16题:
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? ()
第17题:
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You add a ListBox control to the application. The ListBox control is data-bound to an instance of a custom collection class of the Product objects named ProductList. You need to ensure that changes to ProductList are automatically reflected in the ListBox control. What should you do? ()
第18题:
Implement the INotifyPropertyChanged interface in the Product class.
Implement the IQueryable<Product> interface in the ProductList class.
Extend the DependencyObject class in the Product class.
Extend the ObservableCollection<Product> class in the ProductList class.
第19题:
Inherit the control class from the DependencyObject class.
Register a dependency property. In the options settings of the property metadata, specify the Inherits option.
Declare a new property. In the get and set methods of the new property, create an instance of the TraversalRequest class.
Declare a new property. In the get method of the new property call VisualTreeHelper.GetParent. In the set method of the new property, call VisualTreeHelper.GetChild.
第20题:
TextBox
TextElement
UIElement
UserControl
第21题:
Menu
PopUp
ListBox
ContextMenu
第22题:
FlowDocument
FlowDocumentReader
FlowDocumentPageViewer
FlowDocumentScrollViewer
第23题:
Create a template. Declare a VisualState element in the template.
Create a StoryBoard animation. Add an EventTrigger class to the Button control that begins the StoryBoard animation.
Create a ScaleTransform class. Bind the ScaleX and ScaleY properties of the Button control to the Background property by using a custom value converter.
Add a method named ChangeAppearance in the code-behind file. Subscribe the ChangeAppearance method to the MouseEnter event of the Button control.