ListBox 多行多列

<ListBox BorderThickness="0" Margin="20" Width="200" Background="Transparent" ItemsSource="{Binding ListCodes}" ScrollViewer.VerticalScrollBarVisibility="Hidden" >
<ListBox.ItemContainerStyle>
<Style>
<Setter Property="ListBoxItem.Template" Value="{StaticResource CryoListTemplate}">
</Setter>
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Vertical" Height="450" ></WrapPanel>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>

 

 

<ListBox BorderThickness="0" VerticalAlignment="Center" HorizontalAlignment="Center" ItemsSource="{Binding ListCryoData}" >
<ListBox.ItemContainerStyle>
<Style>
<Setter Property="ListBoxItem.Template" Value="{StaticResource CryoRefrigeration}">
</Setter>
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="5"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>

</ListBox>

posted @ 2022-01-21 15:07  十年之前,十年之后  阅读(219)  评论(0)    收藏  举报