WP7 列表框分组
是否有针对 ListBox 或其他 UI 控件的内置分组?我想要一个列表,但有某种形式的分组或部分应用于列表。如下所示:
heading one
list item one
list item two
heading two
list item one
list item two
list item three
list item four
是否有任何东西可以用于此目的而无需从头开始构建某些东西?我不想混合匹配多个列表框,而是更喜欢在数据绑定级别处理此问题的解决方案。
Is there any in-built grouping for ListBoxes or another UI control? I would like to have a list but have some form of grouping or sections applied to the list. As shown below:
heading one
list item one
list item two
heading two
list item one
list item two
list item three
list item four
Is there anything available for such purpose without building something from scratch? I don't wish to mix a match multiple ListBoxes, rather I would prefer a solution where this was handled at the data binding level.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我想到了 LongListSelector。
在不使用 LINQ 的情况下使用 LongListSelector - Andy Pennell 的博客
WP7 LongListSelector 深入探讨 | Part1:视觉结构和API | WindowsPhoneGeek
WP7 LongListSelector 深入探讨 | Part2:数据绑定场景| WindowsPhoneGeek
或者,您可以考虑将这些分组实现中的任何一个应用到手机的列表框。
一个ListBox追随者的自白【利用IValueConverter简单灵活创建item分组列表】-Delay的博客
如何对列表中的项目进行分组他们在 Silverlight 中的第一封信? - 堆栈溢出
LongListSelector comes to mind.
Using LongListSelector without LINQ - Andy Pennell's Blog
WP7 LongListSelector in depth | Part1: Visual structure and API | WindowsPhoneGeek
WP7 LongListSelector in depth | Part2: Data binding scenarios | WindowsPhoneGeek
Alternatively, you could look into applying either of these grouping implementations to the phone's listbox.
Confessions of a ListBox groupie [Using IValueConverter to create a grouped list of items simply and flexibly] - Delay's Blog
How to group items in a list by their first letter in Silverlight? - Stack Overflow
您想要查看 Silverlight for Windows Phone Toolkit 中的“长列表选择器”
它的外观和行为就像手机上联系人/等中的分组行为一样。
You want to look at the "Long List Selector" in the Silverlight for Windows Phone Toolkit
Its a control that looks+behaves just like the grouping behavior in contacts/etc on the phone.
您是否考虑过将不同的列表放入数据透视表的不同项目中?
Have you considered putting the different lists in different items in a pivot?