Silverlight 自动完成框
有谁知道如何下拉 AutoCompleteBox 以查看所有值,而无需猜测条目并开始输入。
我知道我可以使用组合框,但在用户需要输入大量信息的数据输入表单上,用户最好尽可能少地拿起鼠标,因此我想使用自动完成框。然而,在较小的列表中,快速提醒您可以与向上/向下箭头组合进行的选择也很有用。
我看过一些将两个控件的功能合并为一个的示例,我可能会这样做,但想知道是否有更简单的方法。
Does anyone know how to drop down the AutoCompleteBox to see all the values without guessing at an entry and starting typing.
I know I could use a ComboBox but on a data entry form where a user needs to enter lots of information it is preferable for the user to pick up the mouse as little as possible and so therefore I wanted to use the AutoCompleteBox. However, in smaller lists it is also useful to quickly be reminded of the choices which you could do in a combo with the up/down arrow.
I have seen some examples of combining the two controls' functionality into one and I may go this way but wondered if there is a simpler way.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当我这样做时,我在组合框顶部有一个自动完成框,它们都绑定到相同的值,并且自动完成框具有更大的右边距,因此您可以看到组合框箭头。然后,我创建了一个打开结果列表的获得焦点事件,并将 MaximumPrefixLength 设置为 0,这样它就可以在不输入任何内容的情况下进行搜索。
XAML
代码隐藏
When I did this I had an autocomplete box on top of a combobox that were both bound to the same value, with the autocomplete box having a larger right margin so you could see the combobox arrow. Then I created a got focus event that opens the list of results and I set the MinimumPrefixLength to 0 so it would search with nothing typed in.
XAML
Code Behind