WPFwiki, wpf, wiki, .net 3.0, windows presentation foundation, FAQ, free resources, solution, development, microsoft Home of the world's largest WPF FAQ
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>

All content is Copyright ©2007 Xceed Software Inc. unless otherwise indicated. See the Terms of Service. Contributors must read and agree to the Contribution Policy. WPFwiki is brought to you by Xceed, makers of the powerful yet free Xceed DataGrid for WPF.