Table of Contents

Interface IFocusManager

Namespace
Avalonia.Input
Assembly
Avalonia.Base.dll

Manages focus for the application.

[NotClientImplementable]
public interface IFocusManager

Methods

ClearFocus()

Clears currently focused element.

[Unstable("This API might be removed in 11.x minor updates. Please consider focusing another element instead of removing focus at all for better UX.")]
void ClearFocus()

GetFocusedElement()

Gets the currently focused IInputElement.

IInputElement? GetFocusedElement()

Returns

IInputElement