单项选择题

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.  
The application contains a composite user control that includes a TextBox control named txtInput.  
The user control will be hosted in a window and will have handlers for the text-changed event of txtInput.  
You need to ensure that the application meets the following requirements: 
Creates a text-changed event handler named Audit_TextChanged for the txtInput control. 
Executes Audit_TextChanged even when specific handlers mark the event as handled. 
Which code segment should you add to the constructor of the user control?()

A.txtInput.TextChanged+=Audit_TextChanged;
B.AddHandler(TextBox.TextChangedEvent, new  RoutedEventHandler(Audit_TextChanged), true);
C.EventManager.RegisterClassHandler(typeof(TextBox),  TextBox.TextChangedEvent, new  RoutedEventHandler(Audit_TextChanged), true);
D. EventManager.RegisterClassHandler(typeof(TextBox),  TextBox.TextChangedEvent, new  RoutedEventHandler (Audit_TextChanged), false);


您可能感兴趣的试卷

最新试题

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

题型:单项选择题

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows PresentationFramework (WPF) application. You have a page named myPage that contains the following code fragment. You need to ensure that other pages in your application can use CustomerNameBrush.  What should you do? ()

题型:单项选择题

You are developing and XBAP application for your company intranet. During several development iterations, you manually executable, application, and deployement manifest to the test Web Server. You create an HTML file that has a manifest that you use for testing. During the next iteration, you enchance the XBAP application by making changes.When you use the hyperlink to the deployment manifest to test the deployment, you do not see the changes.You need to ensure that the changes you make are visible when you test the deployment from your machine.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 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 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 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?()

题型:单项选择题