Q10.1 - KeyboardNavigation: Tab Stop

Edit

Category

Keyboard Navigation

Edit

Question

How can I ensure that a control will not be focused when cycling through controls with the Tab or Directional keys?

Edit

Answer

This can be done by setting the KeyboardNavigation.IsTabStop attached property on the element you wish to remove from the navigation list.

Example:

<StackPanel>
   <Button Content="Stop" />
   <Button Content="No Stop" KeyboardNavigation.IsTabStop="false" />
   <Button Content="Stop" />
</StackPanel>