KeyboardNavigationMode Enumeration


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Specifies the possible values for changes in focus when logical and directional navigation occurs.

Namespace:   System.Windows.Input
Assembly:  PresentationFramework (in PresentationFramework.dll)

Public Enumeration KeyboardNavigationMode

Member nameDescription

Depending on the direction of the navigation, focus returns to the first or the last item when the end or the beginning of the container is reached, but does not move past the beginning or end of the container.


Each element receives keyboard focus, as long as it is a navigation stop. Navigation leaves the containing element when an edge is reached.


Depending on the direction of the navigation, the focus returns to the first or the last item when the end or the beginning of the container is reached. Focus cannot leave the container using logical navigation.


Tab Indexes are considered on local subtree only inside this container and behave like Continue after that.


No keyboard navigation is allowed inside this container.


The container and all of its child elements as a whole receive focus only once. Either the first tree child or the or the last focused element in the group receives focus

The following example creates a Menu with a number of MenuItem objects. The TabNavigation attached property is set to Cycle on the Menu. This means that when focus is changed using the tab key within the Menu, focus will move from each element and when the last element is reached focus will return to the first element.

<Menu KeyboardNavigation.TabNavigation="Cycle">
  <MenuItem Header="Menu Item 1" />
  <MenuItem Header="Menu Item 2" />
  <MenuItem Header="Menu Item 3" />
  <MenuItem Header="Menu Item 4" />
Dim navigationMenu As New Menu()
Dim item1 As New MenuItem()
Dim item2 As New MenuItem()
Dim item3 As New MenuItem()
Dim item4 As New MenuItem()


KeyboardNavigation.SetTabNavigation(navigationMenu, KeyboardNavigationMode.Cycle)

.NET Framework
Available since 3.0
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top