Class KeyboardNavigation
Defines attached properties that control keyboard navigation behaviour for a container.
public static class KeyboardNavigation
- Inheritance
-
KeyboardNavigation
- Inherited Members
Fields
IsTabStopProperty
Defines the IsTabStop attached property.
public static readonly AttachedProperty<bool> IsTabStopProperty
Field Value
Remarks
The IsTabStop attached property determines whether the control is focusable by tab navigation.
TabIndexProperty
Defines the TabIndex attached property.
public static readonly AttachedProperty<int> TabIndexProperty
Field Value
TabNavigationProperty
Defines the TabNavigation attached property.
public static readonly AttachedProperty<KeyboardNavigationMode> TabNavigationProperty
Field Value
Remarks
The TabNavigation attached property defines how pressing the Tab key causes focus to be navigated between the children of the container.
TabOnceActiveElementProperty
Defines the TabOnceActiveElement attached property.
public static readonly AttachedProperty<IInputElement?> TabOnceActiveElementProperty
Field Value
Remarks
When focus enters a container which has its TabNavigationProperty attached property set to Once, this property defines to which child the focus should move.
Methods
GetIsTabStop(InputElement)
Gets the IsTabStopProperty for an element.
public static bool GetIsTabStop(InputElement element)
Parameters
element
InputElementThe container.
Returns
- bool
Whether the container is a tab stop.
GetTabIndex(IInputElement)
Gets the TabIndexProperty for an element.
public static int GetTabIndex(IInputElement element)
Parameters
element
IInputElementThe container.
Returns
- int
The KeyboardNavigationMode for the container.
GetTabNavigation(InputElement)
Gets the TabNavigationProperty for a container.
public static KeyboardNavigationMode GetTabNavigation(InputElement element)
Parameters
element
InputElementThe container.
Returns
- KeyboardNavigationMode
The KeyboardNavigationMode for the container.
GetTabOnceActiveElement(InputElement)
Gets the TabOnceActiveElementProperty for a container.
public static IInputElement? GetTabOnceActiveElement(InputElement element)
Parameters
element
InputElementThe container.
Returns
- IInputElement
The active element for the container.
SetIsTabStop(InputElement, bool)
Sets the IsTabStopProperty for an element.
public static void SetIsTabStop(InputElement element, bool value)
Parameters
element
InputElementThe container.
value
boolValue indicating whether the container is a tab stop.
SetTabIndex(IInputElement, int)
Sets the TabIndexProperty for an element.
public static void SetTabIndex(IInputElement element, int value)
Parameters
element
IInputElementThe element.
value
intThe tab index.
SetTabNavigation(InputElement, KeyboardNavigationMode)
Sets the TabNavigationProperty for a container.
public static void SetTabNavigation(InputElement element, KeyboardNavigationMode value)
Parameters
element
InputElementThe container.
value
KeyboardNavigationModeThe KeyboardNavigationMode for the container.
SetTabOnceActiveElement(InputElement, IInputElement?)
Sets the TabOnceActiveElementProperty for a container.
public static void SetTabOnceActiveElement(InputElement element, IInputElement? value)
Parameters
element
InputElementThe container.
value
IInputElementThe active element for the container.