SelectionPattern.InvalidatedEvent 필드

정의

컨테이너의 선택 항목이 현저히 변경되어 InvalidateLimit 상수가 허용하는 것보다 더 많은 추가 및 제거 이벤트를 보내야 할 때 발생하는 이벤트를 식별합니다.

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

필드 값

예제

다음 예제에서는 이벤트 수신기에 대 한 선언 된 InvalidatedEvent합니다.

///--------------------------------------------------------------------
/// <summary>
/// Subscribe to the selection events of interest.
/// </summary>
/// <param name="selectionContainer">
/// Automation element that supports SelectionPattern
/// </param>
///--------------------------------------------------------------------
private void SetSelectionEventHandlers
    (AutomationElement selectionContainer)
{            
    AutomationEventHandler selectionInvalidatedHandler =
        new AutomationEventHandler(SelectionInvalidatedHandler);

    Automation.AddAutomationEventHandler(
        SelectionPattern.InvalidatedEvent, 
        selectionContainer, 
        TreeScope.Element, 
        SelectionInvalidatedHandler);
}

///--------------------------------------------------------------------
/// <summary>
/// Selection invalidated event handler.
/// </summary>
/// <param name="src">Object that raised the event.</param>
/// <param name="e">Event arguments.</param>
///--------------------------------------------------------------------
private void SelectionInvalidatedHandler(object src, AutomationEventArgs e)
{
    // TODO: event handling
}
'''--------------------------------------------------------------------
''' <summary>
''' Subscribe to the selection events of interest.
''' </summary>
''' <param name="selectionContainer">
''' Automation element that supports SelectionPattern
''' </param>
'''--------------------------------------------------------------------
Private Sub SetSelectionEventHandlers( _
ByVal selectionContainer As AutomationElement)
    Dim selectionInvalidatedHandler As AutomationEventHandler = _
    New AutomationEventHandler(AddressOf OnSelectionInvalidatedHandler)

    Automation.AddAutomationEventHandler( _
    SelectionPattern.InvalidatedEvent, _
    selectionContainer, TreeScope.Element, selectionInvalidatedHandler)

End Sub

'''--------------------------------------------------------------------
''' <summary>
''' Selection invalidated event handler.
''' </summary>
''' <param name="src">Object that raised the event.</param>
''' <param name="e">Event arguments.</param>
'''--------------------------------------------------------------------
Private Sub OnSelectionInvalidatedHandler( _
ByVal src As Object, ByVal e As AutomationEventArgs)
    ' TODO: event handling
End Sub

설명

컨테이너의 선택 항목이 현저히 변경 되어 보다 더 많은 추가 및 제거 이벤트를 전송 해야 하는 경우 무효화 이벤트 발생을 InvalidateLimit 상수가 허용 합니다.

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

적용 대상