仅通过网格内的项目进行选项卡
我在 Grid 中有一些控件,并且该 Grid 是另一个容器的子容器,该容器也是另一个容器的子容器,依此类推。网格内控件的 Tab 键顺序是正确的,除了当用户在聚焦于网格的最后一个控件时按 TAB 时,焦点会离开网格的控件并转到其他容器的其他控件。如何在网格内循环 Tab 键顺序?网格不应该能够使用键盘的 TAB 键失去焦点。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以设置 KeyboardNavigation.TabNavigation 属性将网格设置为
Cycle
,这样 Tab 键将循环浏览容器内的控件,而不是继续浏览网格外的控件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