您可以定义ItemsPanel
为 WP ToolkitWrapPanel
或只是<StackPanel Orientation="Horizontal" />
<phone:LongListSelector ItemsSource="{Binding Data}">
<phone:LongListSelector.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Title}" />
<ListBox ItemsSource="{Binding SubItems}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding SubItemTitle}" Margin="0,0,12,0" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
</DataTemplate>
</phone:LongListSelector.ItemTemplate>
</phone:LongListSelector>
您可以看到我ListBox
在内部列表中使用,因为据我所知LongListSelector
并没有公开它。