TextCompositionManager.AddTextInputHandler(DependencyObject, TextCompositionEventHandler) 方法

定義

加入 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

要在其中加入事件處理常式的相依性物件。A dependency object to add the event handler to. 相依性物件必須是 UIElementContentElementThe dependency object must be a UIElement or a ContentElement.

handler
TextCompositionEventHandler

可指定要加入之處理常式的委派。A delegate that designates the handler to add.

備註

這個方法會為這個事件的反升版本加入處理常式。This method adds a handler for the bubbling version of this event. 如需此事件之通道版本的詳細資訊, PreviewTextInput請參閱。For information about the tunneling version of this event, see PreviewTextInput.

適用於

另請參閱