TextCompositionManager.AddTextInputHandler(DependencyObject, TextCompositionEventHandler) TextCompositionManager.AddTextInputHandler(DependencyObject, TextCompositionEventHandler) TextCompositionManager.AddTextInputHandler(DependencyObject, TextCompositionEventHandler) TextCompositionManager.AddTextInputHandler(DependencyObject, TextCompositionEventHandler) Method

定义

TextInput 附加事件添加处理程序。Adds a handler for the TextInput attached event.

public:
 static void AddTextInputHandler(System::Windows::DependencyObject ^ element, System::Windows::Input::TextCompositionEventHandler ^ handler);
public static void AddTextInputHandler (System.Windows.DependencyObject element, System.Windows.Input.TextCompositionEventHandler handler);
static member AddTextInputHandler : System.Windows.DependencyObject * System.Windows.Input.TextCompositionEventHandler -> unit
Public Shared Sub AddTextInputHandler (element As DependencyObject, handler As TextCompositionEventHandler)

参数

element
DependencyObject DependencyObject DependencyObject DependencyObject

要向其添加事件处理程序的依赖对象。A dependency object to add the event handler to. 依赖对象必须为 UIElementContentElementThe dependency object must be a UIElement or a ContentElement.

handler
TextCompositionEventHandler TextCompositionEventHandler TextCompositionEventHandler TextCompositionEventHandler

一个委托,用于指定要添加的处理程序。A delegate that designates the handler to add.

注解

此方法为此事件的冒泡版本添加处理程序。This method adds a handler for the bubbling version of this event. 有关此事件的隧道版本的信息, 请参阅PreviewTextInputFor information about the tunneling version of this event, see PreviewTextInput.

适用于

另请参阅