Pergunta

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.

Foi útil?

Solução

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"
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top