![](/img/trans.png)
[英]How to bind data like gridview using listbox in windows phone
[英]How can be bind data in listbox different-2 size in windows phone
是否可以将Listbox中的数据绑定为其他2大小?
我想在Windows Phone中使用单击并按住事件以以下格式显示列表框绑定数据。
这个有可能。 您需要创建两个不同的DataTemplates,并使用一招DataTemplateSelector
将Windows Phone工具包添加到您的项目,并定义一个列表框,如下所示:
<ListBox Source="{ set your binding here}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<toolkit:WrapPanel/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemsPannel>
<ListBox.ItemTemplate>
define your DataTemplates and dataTempleteSelectors here
</ListBox.ItemTemplate>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.