AutomationFocusChangedEventHandler Delegat

Definicja

Reprezentuje metodę zaimplementowaną przez aplikację kliencką automatyzacji interfejsu użytkownika do obsługi zdarzenia zgłoszonego przez dostawcę automatyzacji interfejsu użytkownika po zmianie fokusu.

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)

Parametry

sender
Object

Obiekt, który wzbudził zdarzenie.

e
AutomationFocusChangedEventArgs

Informacje o zdarzeniu.

Przykłady

Poniższy przykład implementuje delegata do obsługi zdarzeń zmienionych fokusem.

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

Uwagi

Użyj delegata, aby zdefiniować metodę AutomationFocusChangedEventHandler wywoływaną przez klienta w celu obsługi zdarzeń zmian fokusu automatyzacji interfejsu użytkownika.

Reprezentowane AutomationElement przez sender może nie mieć żadnych buforowanych właściwości lub wzorców, w zależności od tego, czy aplikacja zasubskrybowała to zdarzenie, gdy CacheRequest był aktywny.

Metody rozszerzania

GetMethodInfo(Delegate)

Pobiera obiekt reprezentujący metodę reprezentowaną przez określonego delegata.

Dotyczy

Zobacz też