Tabbing around controls in a WPF ListView
If you have a ListView containing a bunch of child controls, you don’t get Tab key navigation between those controls for free. Derek has stolen my thunder and posted the full details on how to do this, although I’d like to point out it was me who told him! There are 2 problems with the default behaviour - from Derek’s post:
Essentially you solve 1 by setting the
- When tabbing into the ListView the container for each row of controls (a ListViewItem is treated as a tab stop
- After tabbing across the first row of controls we then tab to the control that follows the ListView, missing out the other rows in the ListView control.
IsTabStop
property of the ListView.ItemContainerStyle
to False
, and 2 by setting the attached KeyboardNavigation.TabNavigation
property on the ListView
to Continue
.