Xaml 列表框水平对齐换行
如何在水平定向的列表框中的新行上启动项目?这是到目前为止我的代码,但它显示了1行中的所有项目,thanx提前Xaml 列表框水平对齐换行,xaml,listbox,panorama-control,itemspanel,Xaml,Listbox,Panorama Control,Itemspanel,如何在水平定向的列表框中的新行上启动项目?这是到目前为止我的代码,但它显示了1行中的所有项目,thanx提前 <phone:PanoramaItem Header="Geklassifiseerd" Orientation="Horizontal" Foreground="Black"> <ListBox x:Name="geklassifisseerd_list"> <ListBox.ItemTemplate
<phone:PanoramaItem Header="Geklassifiseerd" Orientation="Horizontal" Foreground="Black">
<ListBox x:Name="geklassifisseerd_list">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Name}" TextWrapping="Wrap"
Margin="10,0"
Foreground="Black"
FontSize="20"
/>
<TextBlock Text="{Binding Date}"
TextWrapping="Wrap"
Foreground="Black"
Margin="10,-2,10,0"
FontSize="20"
/>
<TextBlock Text="{Binding Image_uri}"
TextWrapping="Wrap"
Margin="10,-2,10,0"
Foreground="Black"
/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ListBox>
得到答案后,我在itemspanetemplate中使用了一个wrappanel,这导致了程序集冲突,我通过nugget重新安装Microsoft.phhone.controls程序集解决了这个问题
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Controls:WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>