CoreTextEditContext.TextRequested 事件
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
發生于文字輸入伺服器需要從文字輸入控制項取得文字範圍時。 應用程式應該處理此事件,並傳回所要求的範圍。
// Register
event_token TextRequested(TypedEventHandler<CoreTextEditContext, CoreTextTextRequestedEventArgs const&> const& handler) const;
// Revoke with event_token
void TextRequested(event_token const* cookie) const;
// Revoke with event_revoker
CoreTextEditContext::TextRequested_revoker TextRequested(auto_revoke_t, TypedEventHandler<CoreTextEditContext, CoreTextTextRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<CoreTextEditContext,CoreTextTextRequestedEventArgs> TextRequested;
function onTextRequested(eventArgs) { /* Your code */ }
coreTextEditContext.addEventListener("textrequested", onTextRequested);
coreTextEditContext.removeEventListener("textrequested", onTextRequested);
- or -
coreTextEditContext.ontextrequested = onTextRequested;
Public Custom Event TextRequested As TypedEventHandler(Of CoreTextEditContext, CoreTextTextRequestedEventArgs)