Editar

Partilhar via


UIElement.IsKeyboardFocused Property

Definition

Gets a value indicating whether this element has keyboard focus. This is a dependency property.

public:
 property bool IsKeyboardFocused { bool get(); };
public bool IsKeyboardFocused { get; }
member this.IsKeyboardFocused : bool
Public ReadOnly Property IsKeyboardFocused As Boolean

Property Value

true if this element has keyboard focus; otherwise, false. The default is false.

Implements

Remarks

Changes to the determined value of this property may be accompanied by focus-related events.

IsKeyboardFocused and IsKeyboardFocusWithin are commonly used within class event handlers for other input-related events, for instance to determine whether the element already has keyboard focus, or to make determinations when mouse events and keyboard events occur in conjunction.

Dependency Property Information

Item Value
Identifier field IsKeyboardFocusedProperty
Metadata properties set to true None

Applies to

See also