多项选择题
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:
AddHandler(TextBox.TextChangedEvent, new RoutedEventHandler(Audit_TextChanged), true);
Which of the following statments are TRUE ?()
A. A text-changed event handler, named Audit_TextChanged, was Created for the txtInput control.
B. Audit_TextChanged will stop running because the event is marked as handled by certain event handlers.
C. Even through the event is marked handled by certain event handlers, Audit_TextChanged will still run.
D. Audit_TextChanged will continue to run until the event is marked as handled.
相关考题
-
单项选择题
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); -
单项选择题
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You write the following code fragment. You create an event handler named StackPanel_PreviewTextInput. You also have a collection of strings named Keywords. You need to ensure that TxtBoxA and TxtBoxB do not contain any of the strings in the Keywords collections. Which code segment should you use?()
A.
B.
C.
D.
