繁体   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