UIElement.GotKeyboardFocus UIElement.GotKeyboardFocus UIElement.GotKeyboardFocus UIElement.GotKeyboardFocus Event

Definición

Se produce cuando este elemento recibe el foco del teclado.Occurs when the keyboard is focused on this element.

public:
 virtual event System::Windows::Input::KeyboardFocusChangedEventHandler ^ GotKeyboardFocus;
public event System.Windows.Input.KeyboardFocusChangedEventHandler GotKeyboardFocus;
member this.GotKeyboardFocus : System.Windows.Input.KeyboardFocusChangedEventHandler 
Public Custom Event GotKeyboardFocus As KeyboardFocusChangedEventHandler 

Implementaciones

Comentarios

IsKeyboardFocusedChangedes un evento similar que realiza un seguimiento de los cambios de estado en una propiedad que mantiene el estado de foco de un elemento. el GotKeyboardFocus evento se genera en muchas de las mismas circunstancias.IsKeyboardFocusedChanged is a similar event that tracks status changes in a property that maintains the focus state for an element; the GotKeyboardFocus event is raised in many of the same circumstances.

Dado que este evento usa el enrutamiento de propagación, el elemento que tiene el foco podría ser un elemento secundario en lugar del elemento en el que está asociado el controlador de eventos.Because this event uses bubbling routing, the element that has focus might be a child element instead of the element where the event handler is actually attached. Source Busque en los datos del evento para determinar el elemento real que tiene el foco.Check the Source in the event data to determine the actual element that has focus.

Este evento crea un alias para el Keyboard.GotKeyboardFocus evento adjunto para esta clase, de GotKeyboardFocus forma que forma parte de la lista de UIElement miembros de clase cuando se hereda como un elemento base.This event creates an alias for the Keyboard.GotKeyboardFocus attached event for this class so that GotKeyboardFocus is part of the class members list when UIElement is inherited as a base element. Los controladores de eventos adjuntos al GotKeyboardFocus evento se adjuntan al Keyboard.GotKeyboardFocus evento adjunto subyacente y reciben la misma instancia de datos de evento.Event handlers that are attached to the GotKeyboardFocus event are attached to the underlying Keyboard.GotKeyboardFocus attached event and receive the same event data instance.

Información sobre eventos enrutadosRouted Event Information

Campo de identificadorIdentifier field GotKeyboardFocusEvent
Estrategia de enrutamientoRouting strategy PropagaciónBubbling
delegadoDelegate KeyboardFocusChangedEventHandler

Se aplica a

Consulte también: