tab only through items inside grid

1.2k views Asked by At

I have some controls inside a Grid, and that Grid is a child container of another container, which is also a child container of another container and so on. The tab order of controls inside the Grid is correct except that when user presses TAB while focusing on last control of the Grid, the focus leaves the Grid's controls and goes to other controls of other containers. How do I circulate the tab order inside the Grid? Grid should not be able to loose focus using TAB key of the keyboard.

1

There are 1 answers

0
Rachel On BEST ANSWER

You can set the KeyboardNavigation.TabNavigation property on your grid to Cycle so the Tab key will cycle through the controls inside the container instead of continuing to controls outside the grid

KeyboardNavigation.TabNavigation="Cycle"