![](/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.