New to Telerik UI for WPFStart a free 30-day trial

Represents a keyboard navigation helper.

Definition

Namespace:Telerik.Windows.Controls.Primitives

Assembly:Telerik.Windows.Controls.dll

Syntax:

C#
public class KeyboardNavigation

Inheritance: objectKeyboardNavigation

Constructors

Initializes a new instance of the KeyboardNavigation class.

C#
public KeyboardNavigation(IListControl control, Func<int, bool> isSelectableIndex)
Parameters:controlIListControlisSelectableIndexFunc<int, bool>

Properties

Gets or sets whether the index is selectable.

C#
public Func<int, bool> IsSelectableIndex { get; set; }

Methods

Gets the next index of an item which is selectable.

C#
public int GetNextSelectableIndex(int current, int skip = 1)
Parameters:currentintskipintReturns:

int

Gets the previous index of an item which is selectable.

C#
public int GetPreviousSelectableIndex(int current, int skip = 1)
Parameters:currentintskipintReturns:

int

Navigates to the first item in the child collection.

C#
public void NavigateFirst(Key key = 0)
Parameters:keyKey

Navigates to the last item in the child collection.

C#
public void NavigateLast(Key key = 0)
Parameters:keyKey

Navigates to the next item in the child collection.

C#
public void NavigateNext(int startIndex, int increment, Key key = 0)
Parameters:startIndexintincrementintkeyKey

Navigates to the next item in the child collection.

C#
public void NavigatePrevious(int startIndex, int increment, Key key = 0)
Parameters:startIndexintincrementintkeyKey

Navigates to item using its index in the child collection.

C#
public void NavigateToIndex(int index, Key key = 0)
Parameters:indexintkeyKey