Windows phone 8 Longlistselector控件Windows Phone 8 SDK中的ItemsPanel属性
有人知道Windows Phone 8 SDK(不是用于WP 7.5的Windows Phone toolkit)中的Longlistselector控件是否具有ItemsPanel属性或等效属性吗 ListBox控件有这样的属性,我使用它在包装器中包装项目Windows phone 8 Longlistselector控件Windows Phone 8 SDK中的ItemsPanel属性,windows-phone-8,longlistselector,itemspanel,Windows Phone 8,Longlistselector,Itemspanel,有人知道Windows Phone 8 SDK(不是用于WP 7.5的Windows Phone toolkit)中的Longlistselector控件是否具有ItemsPanel属性或等效属性吗 ListBox控件有这样的属性,我使用它在包装器中包装项目 <ListBox> <ListBox.ItemsPanel> <ItemsPanelTemplate> <toolkit:WrapPanel/>
<ListBox>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<toolkit:WrapPanel/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
这里有一个答案:但这指的是工具包中的Longlistselector,而不是WP8SDK中的Longlistselector(在WP8SDK中,我没有使用上述解决方案的源代码访问权)
有人有什么想法吗?您应该能够通过
布局模式
属性实现这一点。将该值设置为“栅格”
获取或设置一个值,该值指定
Microsoft.Phone.Controls.LongListSelector处于列表模式或网格模式
从Microsoft.Phone.Controls.LongListSelector布局模式中选择模式
枚举
谢谢!成功了!我还必须设置GridCellSize属性。不要忘记,如果不同时添加GridCellSize属性,将引发异常,例如:
<phone:LongListSelector ItemsSource="{Binding Items}" LayoutMode="Grid" >