Focus Manager
The FocusManager
service is responsible for managing the keyboard focus for the application. It keeps track of the currently focused element and the current focus scope.
The FocusManager
can be access through an instance of TopLevel
or Window
, for more details on accessing TopLevel
please visit TopLevel page:
var focusManager = window.FocusManager;
Methods
GetFocusedElement()
Returns the currently focused element.
IInputElement? GetFocusedElement()
ClearFocus()
Clears the currently focused element.
void ClearFocus()