Skip to main content

Focus Method

Focuses the control.

Definition

Namespace: Avalonia.Input
Assembly: Avalonia.Base (in Avalonia.Base.dll)

bool Focus(
NavigationMethod method = NavigationMethod.Unspecified,
KeyModifiers keyModifiers = KeyModifiers.None
)
View Source

Parameters

  NavigationMethod  (Optional)
The method by which focus was changed.
  KeyModifiers  (Optional)
Any key modifiers active at the time of focus.

Return Value

Boolean

See Also

Reference

IInputElement Interface
Avalonia.Input Namespace