在Windows手机中显示列表 [英] Display List in windows phone
问题描述
大家好,
我是Windows Phone 8的入门级。
我希望绑定列表视图,如下所示。
类别:物品清单
类别1
- 第1项
- 第2项
- 第3项
第2类
- 第1项
- Item5
对于我需要使用哪个控件。如果可能的话,请给我一个示例代码。
请尽快回复我。
非常感谢。
祝你有愉快的一天:)
您可以从类别列表(类别,[项目],类别,[项目],....,lastCategory,[项目])生成一个集合,并将此集合绑定到listView。为listView创建ItemsTemplateSelector和两个模板(用于标题(类别名称)和
项目类别)。
问候,Nikita
Hi All,
I am an entry level for windows phone 8.
and i want to bind list view like below .
Category : Item list
Category 1
- Item1
- Item2
- Item3
Category 2
- Item1
- Item5
For this which control i need to use. if possible give me a sample code for this.
please reply me as soon as possible .
Thanks a lot .
Have a nice day :)
Hi, samarth88.
You can generate one collection from category list (category, [items], category, [items],...., lastCategory, [items]) and binding this collection to a listView. Create ItemsTemplateSelector for listView and two templates (for header (category name) and for item from category).
Regards, Nikita.
这篇关于在Windows手机中显示列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!