IsFocusWithin Property

Returns true if the focus is within this element.
Public ReadOnly Property IsFocusWithin As Boolean
public bool IsFocusWithin {get;}

This property returns true if this element or a descendant element has focus. Note that this does not check for keyboard focus. It checks for logical focus as managed by the System.Windows.Input.FocusManager class.


Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also