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 자동화 클라이언트 애플리케이션에서 사용되며 공급자는 TextPatternIdentifiers 해당 필드를 사용해야 UI 자동화.

적용 대상

추가 정보