簡體   English   中英

如何在Windows Phone中綁定列表框中不同2大小的數據

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM