我有一个列表框,在其中使用 ListBox.ItemsPanel - WrapPanel。
<ListBox ItemsSource="{Binding Path=Applets}" Margin="10,92,10,10" ScrollViewer.HorizontalScrollBarVisibility="Disabled" >
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Vertical" IsItemsHost="True">
</WrapPanel>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>...
我试图让 wrappanel 具有这样的行为,即当宽度变宽时项目填充到右侧,并在窗口变窄时根据需要进行包装。我玩过它,但正确的组合让我望而却步。有人有建议吗?
我的下一个目标是能够重新排序/排序项目并更新渲染。
TIA