我在itemscontrol中有八个文本框.并且在按下选项卡时,光标应从一个文本框移动到另一个文本框. [英] I have eight textboxes in an itemscontrol. And on pressing tab cursor should move from one textbox to another.

查看:55
本文介绍了我在itemscontrol中有八个文本框.并且在按下选项卡时,光标应从一个文本框移动到另一个文本框.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,ALl

我在itemscontrol中有八个文本框.并且在按下选项卡时,光标应从一个文本框移动到另一个文本框.
我怎样才能做到这一点?请帮忙.


在此先感谢

Hi ALl

I have eight textboxes in an itemscontrol. And on pressing tab cursor should move from one textbox to another.
How can I do that? Please help.


Thanks in advance

推荐答案

<Control KeyboardNavigation.TabIndex="0" ... />


针对您的未回答(请使用 在此答案下方添加评论 链接以回复)...

ItemsControl不能使用制表符,因为它本身就是控件,并且当您按下Tab键时,焦点将移到与ItemsControl相同的层次结构级别的下一个控件.向上/向下箭头键可能有效.如果没有,您将不得不重新考虑实现(不要使用ItemsControl),或者编写一个继承了ItemsControl的新类,然后自己编写键盘处理代码.
In response to your non-answer (use the Add Comment link under this answer to reply)...

An ItemsControl doesn''t honor the tab character because it''s a control itself, and when you press the Tab key, focus will move to the next control at the same hierarchiacal level as the ItemsControl. The Up/Down arrow keys may work. If they don''t, you''re going to have to either rethink your implementation (don''t use a ItemsControl), or write a new class that inherits ItemsControl, and write the keyboard handling code yourself.


这篇关于我在itemscontrol中有八个文本框.并且在按下选项卡时,光标应从一个文本框移动到另一个文本框.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆