共用方式為


CoreTextEditContext.SelectionRequested 事件

定義

發生于文字輸入伺服器需要取得文字範圍,代表文字輸入控制項中目前選取的文字時。 應用程式應該處理此事件,並傳回所要求的範圍。

// 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) 

事件類型

適用於