Skip to main content

ToNavigationDirection Method

Converts a keypress into a NavigationDirection.

Definition​

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

public static NavigationDirection? ToNavigationDirection(
this Key key,
KeyModifiers modifiers = KeyModifiers.None
)

Parameters​

  Key
The key.
  KeyModifiers  (Optional)
The keyboard modifiers.

Return Value​

Nullable(NavigationDirection)
A NavigationDirection if the keypress represents a navigation keypress.

Usage Note​

In Visual Basic and C#, you can call this method as an instance method on any object of type Key. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also​

Reference​

NavigationDirectionExtensions Class
Avalonia.Input Namespace