KeyboardNavigation.TabNavigation Attached Property
Gets or sets the logical tab navigation behavior for the children of the element that this property is set on.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
<object KeyboardNavigation.TabNavigation="KeyboardNavigationMode" .../>
Property Value
Type: System.Windows.Input.KeyboardNavigationModeHow the container will move the focus when tab navigation occurs. The default value is Continue.
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 navigationMenu = new Menu(); MenuItem item1 = new MenuItem(); MenuItem item2 = new MenuItem(); MenuItem item3 = new MenuItem(); MenuItem item4 = new MenuItem(); navigationMenu.Items.Add(item1); navigationMenu.Items.Add(item2); navigationMenu.Items.Add(item3); navigationMenu.Items.Add(item4); KeyboardNavigation.SetTabNavigation(navigationMenu, KeyboardNavigationMode.Cycle);
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.