Skip to main content

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

Namespace:   System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)

public bool IsKeyboardFocused { get; }
property bool IsKeyboardFocused {
	virtual bool get() sealed;
abstract IsKeyboardFocused : bool with get
override IsKeyboardFocused : bool with get
Public ReadOnly Property IsKeyboardFocused As Boolean

Property Value


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



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

and 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

Identifier field


Metadata properties set to true


Version Information
.NET Framework
Available since 3.0
Return to top