FocusManager.

SetFocusedElement(IFocusScope, IInputElement, NavigationMethod, InputModifiers) Method

Summary

Sets the currently focused element in the specified scope.
Namespace
Avalonia.Input
Containing Type
FocusManager

Syntax

public void SetFocusedElement(IFocusScope scope, IInputElement element, NavigationMethod method = Unspecified, InputModifiers modifiers = None)

Remarks

If the specified scope is the current Scope then the keyboard focus will change.

Parameters

Name Type Description
scope IFocusScope The focus scope.
element IInputElement The element to focus. May be null.
method NavigationMethod The method by which focus was changed.
modifiers InputModifiers Any input modifiers active at the time of focus.

Return Value

Type Description
void