RichEditBox.TextCompositionStarted 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
当用户开始通过输入法编辑器 (输入法) 撰写文本时发生。
// Register
event_token TextCompositionStarted(TypedEventHandler<RichEditBox, TextCompositionStartedEventArgs const&> const& handler) const;
// Revoke with event_token
void TextCompositionStarted(event_token const* cookie) const;
// Revoke with event_revoker
RichEditBox::TextCompositionStarted_revoker TextCompositionStarted(auto_revoke_t, TypedEventHandler<RichEditBox, TextCompositionStartedEventArgs const&> const& handler) const;
public event TypedEventHandler<RichEditBox,TextCompositionStartedEventArgs> TextCompositionStarted;
function onTextCompositionStarted(eventArgs) { /* Your code */ }
richEditBox.addEventListener("textcompositionstarted", onTextCompositionStarted);
richEditBox.removeEventListener("textcompositionstarted", onTextCompositionStarted);
- or -
richEditBox.ontextcompositionstarted = onTextCompositionStarted;
Public Custom Event TextCompositionStarted As TypedEventHandler(Of RichEditBox, TextCompositionStartedEventArgs)
<RichEditBox TextCompositionStarted="eventhandler"/>
事件类型
注解
有关事件数据,请参阅 TextCompositionStartedEventArgs。
仅当文本通过输入法编辑器 (IME) 撰写时,才会发生此事件。 文本合成事件按以下顺序发生:
- TextCompositionStarted
- 文本更改
- TextChanged
- TextCompositionChanged
- TextCompositionEnded
在 TextCompositionStarted 事件之后, TextChanging>TextChanged>TextCompositionChanged 事件周期可以在 TextCompositionEnded 事件发生之前多次发生。