UIElement.PreviewTextInput UIElement.PreviewTextInput UIElement.PreviewTextInput UIElement.PreviewTextInput Event

定義

此元素以一種與裝置無關的方式取得文字時發生。Occurs when this element gets text in a device-independent manner.

public:
 virtual event System::Windows::Input::TextCompositionEventHandler ^ PreviewTextInput;
public event System.Windows.Input.TextCompositionEventHandler PreviewTextInput;
member this.PreviewTextInput : System.Windows.Input.TextCompositionEventHandler 
Public Custom Event PreviewTextInput As TextCompositionEventHandler 

實作

備註

PreviewTextInput事件可讓元件或應用程式以與裝置無關的方式接聽文字輸入。The PreviewTextInput event allows a component or application to listen for text input in a device-independent manner. 鍵盤是主要的方法PreviewTextInput; 不過也可以產生語音、 手寫和其他輸入的裝置PreviewTextInputThe keyboard is the primary means of PreviewTextInput; but speech, handwriting, and other input devices can also generate PreviewTextInput.

因為索引鍵組合-在預設鍵盤或輸入的法編輯器-透過多個索引鍵的事件可能會引發一個文字輸入的事件。Because of key combinations - either in default keyboards or through input method editors - multiple key events may raise just one text input event.

此事件建立的別名TextCompositionManager.PreviewTextInput附加事件,此類別中,以便PreviewTextInput屬於類別的成員清單時UIElement繼承為基底的項目。This event creates an alias for the TextCompositionManager.PreviewTextInput attached event for this class, so that PreviewTextInput is part of the class members list when UIElement is inherited as a base element. 附加至事件處理常式PreviewTextInput事件會附加至基礎TextCompositionManager.PreviewTextInput附加事件,並接收相同的事件資料執行個體。Event handlers that are attached to the PreviewTextInput event are attached to the underlying TextCompositionManager.PreviewTextInput attached event and receive the same event data instance.

路由事件資訊Routed Event Information

識別項欄位Identifier field PreviewTextInputEvent
路由策略Routing strategy 通道Tunneling
Delegate - 委派Delegate TextCompositionEventHandler

適用於

另請參閱