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 する可能性があります。

注意

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

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

適用対象

こちらもご覧ください