TextPattern.TextSelectionChangedEvent フィールド

定義

テキストの選択が変更されたときに発生するイベントを識別します。

public: static initonly System::Windows::Automation::AutomationEvent ^ TextSelectionChangedEvent;
public static readonly System.Windows.Automation.AutomationEvent TextSelectionChangedEvent;
 staticval mutable TextSelectionChangedEvent : System.Windows.Automation.AutomationEvent
Public Shared ReadOnly TextSelectionChangedEvent As AutomationEvent 

フィールド値

// Initialize a selection changed listener.
// The target selection is reflected in the client.
Automation.AddAutomationEventHandler(
    TextPattern.TextSelectionChangedEvent,
    targetDocument,
    TreeScope.Element,
    OnTextSelectionChange);
' Initialize a selection changed listener.
' The target selection is reflected in the client.
Dim onSelectionChanged As AutomationEventHandler = _
New AutomationEventHandler(AddressOf OnTextSelectionChange)
Automation.AddAutomationEventHandler( _
TextPattern.TextSelectionChangedEvent, targetDocument, _
TreeScope.Element, onSelectionChanged)

注釈

一部のテキスト コントロールでは、テキストの挿入ポイント (カーソル) が幅 0 のテキスト選択として処理され、カーソルの移動時に TextSelectionChangedEvent が発生することがあります。

Note

カーソルの移動に従うには、UI オートメーションクライアントは、TextSelectionChangedEventに応じてではなく、対応するUI オートメーション要素イベントをリッスンして、カーソルの変更を追跡することをお勧めします。

この識別子は、プロバイダーが TextPatternIdentifiers 内の同等のフィールドUI オートメーション使用する必要があるUI オートメーションクライアント アプリケーションによって使用されます。

適用対象

こちらもご覧ください