ContentElement.PreviewTextInput 事件

定义

当此元素以独立于设备的方式获取文本时发生。

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 允许组件或应用程序以独立于设备的方式侦听文本输入。 键盘是主要方法 PreviewTextInput;但语音、手写和其他输入设备也可以生成 PreviewTextInput

由于键组合 (无论是在默认键盘中还是通过输入法编辑器) - 多个键事件可能只引发一个文本输入事件。

此事件为 TextCompositionManager.PreviewTextInput 此类的附加事件创建别名,以便在 PreviewTextInput 继承为基元素时 ContentElement 成为类成员列表的一部分。 附加到 PreviewTextInput 事件的事件处理程序将附加到基础 TextCompositionManager.PreviewTextInput 附加事件并接收相同的事件数据实例。

路由事件信息

项目 价值
标识符字段 PreviewTextInputEvent
路由策略 隧道
代理 TextCompositionEventHandler

适用于

另请参阅