有人知道来自 Windows Phone 8 SDK(不是 WP 7.5 的 Windows Phone 工具包)的 Longlistselector 控件是否具有 ItemsPanel 属性或等效属性?
ListBox 控件具有这样的属性,我用它来包装 WrapPanel 中的项目。
<ListBox>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<toolkit:WrapPanel/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
这里有答案:How to wrap ItemsPanel in LongListSelector?但这指的是在工具包中找到的 Longlistselector 不在 WP8 SDK 中(我无法访问源代码来使用提到的解决方案)。
有人有想法吗?
最佳答案
您应该可以使用 LayoutMode
完成此操作。属性(property)。将值设置为网格
Gets or sets a value that specifies if the Microsoft.Phone.Controls.LongListSelector is in a list mode or grid mode from the Microsoft.Phone.Controls.LongListSelectorLayoutMode enum.
<phone:LongListSelector ItemsSource="{Binding Items}" LayoutMode="Grid" >
关于windows-phone-8 - Longlistselector 控件中的 ItemsPanel 属性 Windows Phone 8 SDK,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15620743/