AutomationFocusChangedEventHandler 대리자

정의

포커스가 변경되었을 때 UI 자동화 공급자에서 발생하는 이벤트를 처리하기 위해 UI 자동화 클라이언트 애플리케이션에서 구현하는 메서드를 나타냅니다.

public delegate void AutomationFocusChangedEventHandler(System::Object ^ sender, AutomationFocusChangedEventArgs ^ e);
public delegate void AutomationFocusChangedEventHandler(object sender, AutomationFocusChangedEventArgs e);
type AutomationFocusChangedEventHandler = delegate of obj * AutomationFocusChangedEventArgs -> unit
Public Delegate Sub AutomationFocusChangedEventHandler(sender As Object, e As AutomationFocusChangedEventArgs)

매개 변수

sender
Object

이벤트를 발생시킨 개체입니다.

e
AutomationFocusChangedEventArgs

이벤트 정보입니다.

예제

다음 예에서는 포커스 변경 이벤트를 처리 하는 대리자를 구현 합니다.

private void OnFocusChanged(object src, AutomationFocusChangedEventArgs e)
{
    AutomationElement elementFocused = src as AutomationElement;
    // TODO: Do something in response to the focus change.
}
Private Sub OnFocusChanged(ByVal src As Object, ByVal e As AutomationFocusChangedEventArgs)
    Dim elementFocused As AutomationElement = DirectCast(src, AutomationElement)
    ' TODO: Do something in response to the focus change.
End Sub

설명

대리자를 AutomationFocusChangedEventHandler 사용하여 포커스가 변경된 UI 자동화 이벤트를 처리하기 위해 클라이언트에서 호출하는 메서드를 정의합니다.

합니다 AutomationElement 나타내는 sender 수 있는 모든 캐시 되지 속성 또는 애플리케이션이이 이벤트를 구독 하는지 여부에 따라 패턴을 CacheRequest 활성 상태 였던 합니다.

확장 메서드

GetMethodInfo(Delegate)

지정된 대리자가 나타내는 메서드를 나타내는 개체를 가져옵니다.

적용 대상

추가 정보