NavigationDirectionExtensionsToNavigationDirection Method

Converts a keypress into a NavigationDirection.

Definition

Namespace: Avalonia.Input
Assembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public static NavigationDirection? ToNavigationDirection(
	this Key key,
	KeyModifiers modifiers = KeyModifiers.None
)

Parameters

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

Return Value

NullableNavigationDirection
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