WPF:绑定列表框,其中每个项目是一个制表位是一个、绑定、项目、列表

由网友(煙不離手)分享简介:我刚刚建立了一个WPF的形​​式,其中包含一个列表框。该列表已绑定到它的TextBox控件列表。我需要让每一个TextBox控件一个接受tab让用户可以在多个命中选项卡,类型,在未来的数,等再次和类型打标签。I just built a WPF form that contains a ListBox. The Li...

我刚刚建立了一个WPF的形​​式,其中包含一个列表框。该列表已绑定到它的TextBox控件列表。我需要让每一个TextBox控件一个接受tab让用户可以在多个命中选项卡,类型,在未来的数,等再次和类型打标签。

I just built a WPF form that contains a ListBox. The ListBox has bound to it a list of TextBox controls. I need to make each TextBox control a TabStop so that a user can hit tab, type in a number, hit tab again and type in the next number, etc.

但问题是,列表框本身捕捉选项卡,然后下一个标签跳转到列表框后,下面的控制。

Problem is, the ListBox itself catches the tab then the next tab skips to following control after the ListBox.

有没有一种方法,使每一个文本框列表框里面是tabbable(或者是另一种类型的数据绑定控件,将工作)?

Is there a way to make each TextBox inside the ListBox be tabbable (or perhaps another type of databound control that would work)?

感谢

推荐答案

嗯,我们真的没有足够的信息来回答这个问题(这要看是什么模板和样式列表框使用),但你可能需要与KeyboardNavigation.TabNavigation财产剧透的项目,以改变如何循环和列表框设置为false IsTabStop。

Well we don't really have enough information to answer the question (this depends on what Templates and Style the ListBox is using) but you'll potentially need to play with the KeyboardNavigation.TabNavigation property to change how to cycle through the items and set IsTabStop on the ListBox to false.

是这样的:

<ListBox DataSource={Binding} IsTabStop="False" KeyboardNavigation.TabNavigation="Cycle" />
阅读全文

相关推荐

最新文章