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