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, KeyModifiers keyModifiers = 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. |
keyModifiers | KeyModifiers | Any key modifiers active at the time of focus. |
Return Value
Type | Description |
---|---|
void |