AutomationFocusChangedEventHandler Delegato
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Rappresenta il metodo implementato dall'applicazione client Automazione interfaccia utente per gestire l'evento generato da un provider di Automazione interfaccia utente quando lo stato attivo è cambiato.
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)
Parametri
- sender
- Object
Oggetto che ha generato l'evento.
Informazioni sull'evento.
Esempio
Nell'esempio seguente viene implementato un delegato per gestire gli eventi modificati dallo stato attivo.
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
Commenti
Usare un delegato AutomationFocusChangedEventHandler per definire il metodo chiamato da un client per gestire Automazione interfaccia utente eventi di modifica dello stato attivo.
L'oggetto AutomationElement rappresentato da sender potrebbe non avere proprietà o modelli memorizzati nella cache, a seconda che l'applicazione abbia sottoscritto questo evento mentre era attivo.CacheRequest
Metodi di estensione
| Nome | Descrizione |
|---|---|
| GetMethodInfo(Delegate) |
Ottiene un oggetto che rappresenta il metodo rappresentato dal delegato specificato. |