<Window x:Class="WpfApp03.TestWin11"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp03"
mc:Ignorable="d"
Title="TestWin11" Height="74" Width="713">
<Grid>
<ListBox>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"></StackPanel>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<TextBlock Text="AAA"/>
<TextBlock Text="BBB"/>
<TextBlock Text="CCC"/>
<TextBlock Text="DDD"/>
</ListBox>
</Grid>
</Window>
wpf ItemsPanelTemplate实现横向排列
最新推荐文章于 2024-02-05 16:52:53 发布