다음을 통해 공유


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 자동화 포커스 변경 이벤트를 처리하기 위해 클라이언트에서 호출하는 메서드를 정의합니다.

애플리케이션이 AutomationElementsender 활성 상태인 동안 CacheRequest 이 이벤트를 구독했는지 여부에 따라 표시되는 속성 또는 패턴이 캐시되지 않을 수 있습니다.

확장명 메서드

Name Description
GetMethodInfo(Delegate)

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

적용 대상

추가 정보