KeyboardNavigation.TabNavigation Attached Property

Gets or sets the logical tab navigation behavior for the children of the element that this property is set on.

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

See KeyboardNavigation.GetTabNavigation, KeyboardNavigation.SetTabNavigation
See KeyboardNavigation.GetTabNavigation, KeyboardNavigation.SetTabNavigation
See KeyboardNavigation.GetTabNavigation, KeyboardNavigation.SetTabNavigation
<object KeyboardNavigation.TabNavigation="KeyboardNavigationMode" .../>

Property Value

How the container will move the focus when tab navigation occurs. The default value is Continue.

Identifier field


Metadata properties set to true


Tab navigation is invoked by using the TAB key.

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" />

Menu navigationMenu = new Menu();
MenuItem item1 = new MenuItem();
MenuItem item2 = new MenuItem();
MenuItem item3 = new MenuItem();
MenuItem item4 = new MenuItem();



Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.