TextPattern.TextSelectionChangedEvent フィールド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
テキストの選択が変更されたときに発生するイベントを識別します。
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 オートメーションクライアント アプリケーションによって使用されます。