다음을 통해 공유


TextPattern.TextChangedEvent 필드

정의

텍스트 내용이 수정될 때 발생하는 이벤트를 식별합니다.

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

필드 값

AutomationEvent

예제

// Initialize a text changed listener.
// An instance of TextPatternRange will become invalid if 
// one of the following occurs:
// 1) The text in the provider changes via some user activity.
// 2) ValuePattern.SetValue is used to programatically change 
// the value of the text in the provider.
// The only way the client application can detect if the text 
// has changed (to ensure that the ranges are still valid), 
// is by setting a listener for the TextChanged event of 
// the TextPattern. If this event is raised, the client needs 
// to update the targetDocumentRange member data to ensure the 
// user is working with the updated text. 
// Clients must always anticipate the possibility that the text 
// can change underneath them.
Automation.AddAutomationEventHandler(
    TextPattern.TextChangedEvent,
    targetDocument,
    TreeScope.Element,
    TextChanged);
' Initialize a text changed listener.
' An instance of TextPatternRange will become invalid if 
' one of the following occurs:
' 1) The text in the provider changes via some user activity.
' 2) ValuePattern.SetValue is used to programatically change 
' the value of the text in the provider.
' The only way the client application can detect if the text 
' has changed (to ensure that the ranges are still valid), 
' is by setting a listener for the TextChanged event of 
' the TextPattern. If this event is raised, the client needs 
' to update the targetDocumentRange member data to ensure the 
' user is working with the updated text. 
' Clients must always anticipate the possibility that the text 
' can change underneath them.
Dim onTextChanged As AutomationEventHandler = _
New AutomationEventHandler(AddressOf TextChanged)
Automation.AddAutomationEventHandler( _
TextPattern.TextChangedEvent, targetDocument, TreeScope.Element, onTextChanged)

설명

이 식별자는 UI 자동화 클라이언트 애플리케이션에서 사용 됩니다. UI 자동화 공급자의 해당 필드를 사용 해야 TextPatternIdentifiers합니다.

적용 대상

추가 정보