Class KeyboardNavigationHandler
Handles keyboard navigation for a window.
[Unstable]
public sealed class KeyboardNavigationHandler : IKeyboardNavigationHandler
- Inheritance
-
KeyboardNavigationHandler
- Implements
- Inherited Members
Constructors
KeyboardNavigationHandler()
public KeyboardNavigationHandler()
Methods
GetNext(IInputElement, NavigationDirection)
Gets the next control in the specified navigation direction.
public static IInputElement? GetNext(IInputElement element, NavigationDirection direction)
Parameters
element
IInputElementThe element.
direction
NavigationDirectionThe navigation direction.
Returns
- IInputElement
The next element in the specified direction, or null if
element
was the last in the requested direction.
Move(IInputElement?, NavigationDirection, KeyModifiers)
Moves the focus in the specified direction.
public void Move(IInputElement? element, NavigationDirection direction, KeyModifiers keyModifiers = KeyModifiers.None)
Parameters
element
IInputElementThe current element.
direction
NavigationDirectionThe direction to move.
keyModifiers
KeyModifiersAny key modifiers active at the time of focus.
SetOwner(IInputRoot)
Sets the owner of the keyboard navigation handler.
[PrivateApi]
public void SetOwner(IInputRoot owner)
Parameters
owner
IInputRootThe owner.
Remarks
This method can only be called once, typically by the owner itself on creation.