Table of Contents

Class KeyboardNavigation

Namespace
Avalonia.Input
Assembly
Avalonia.Base.dll

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

AttachedProperty<bool>

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

AttachedProperty<int>

TabNavigationProperty

Defines the TabNavigation attached property.

public static readonly AttachedProperty<KeyboardNavigationMode> TabNavigationProperty

Field Value

AttachedProperty<KeyboardNavigationMode>

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

AttachedProperty<IInputElement>

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 InputElement

The 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 IInputElement

The container.

Returns

int

The KeyboardNavigationMode for the container.

GetTabNavigation(InputElement)

Gets the TabNavigationProperty for a container.

public static KeyboardNavigationMode GetTabNavigation(InputElement element)

Parameters

element InputElement

The container.

Returns

KeyboardNavigationMode

The KeyboardNavigationMode for the container.

GetTabOnceActiveElement(InputElement)

Gets the TabOnceActiveElementProperty for a container.

public static IInputElement? GetTabOnceActiveElement(InputElement element)

Parameters

element InputElement

The 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 InputElement

The container.

value bool

Value 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 IInputElement

The element.

value int

The tab index.

SetTabNavigation(InputElement, KeyboardNavigationMode)

Sets the TabNavigationProperty for a container.

public static void SetTabNavigation(InputElement element, KeyboardNavigationMode value)

Parameters

element InputElement

The container.

value KeyboardNavigationMode

The KeyboardNavigationMode for the container.

SetTabOnceActiveElement(InputElement, IInputElement?)

Sets the TabOnceActiveElementProperty for a container.

public static void SetTabOnceActiveElement(InputElement element, IInputElement? value)

Parameters

element InputElement

The container.

value IInputElement

The active element for the container.