TextBox.BeforeTextChanging 事件
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
當文字方塊中的文字開始變更,但在 Text 屬性更新之前, 就會 同步發生。
// Register
event_token BeforeTextChanging(TypedEventHandler<TextBox, TextBoxBeforeTextChangingEventArgs const&> const& handler) const;
// Revoke with event_token
void BeforeTextChanging(event_token const* cookie) const;
// Revoke with event_revoker
TextBox::BeforeTextChanging_revoker BeforeTextChanging(auto_revoke_t, TypedEventHandler<TextBox, TextBoxBeforeTextChangingEventArgs const&> const& handler) const;
public event TypedEventHandler<TextBox,TextBoxBeforeTextChangingEventArgs> BeforeTextChanging;
function onBeforeTextChanging(eventArgs) { /* Your code */ }
textBox.addEventListener("beforetextchanging", onBeforeTextChanging);
textBox.removeEventListener("beforetextchanging", onBeforeTextChanging);
- or -
textBox.onbeforetextchanging = onBeforeTextChanging;
Public Custom Event BeforeTextChanging As TypedEventHandler(Of TextBox, TextBoxBeforeTextChangingEventArgs)
<TextBox BeforeTextChanging="eventhandler"/>
事件類型
Windows 需求
裝置系列 |
Windows 10 Fall Creators Update (已於 10.0.16299.0 引進)
|
API contract |
Windows.Foundation.UniversalApiContract (已於 v5.0 引進)
|