您好我正在研究POS(销售点)系统,因为我必须在下面提到的图像中显示订单
我尝试使用Wrap面板,但它会像
一样生成Grid
看到我想要实现与image1完全相同的所有网格的最大高度,任何人都可以帮助哪个WPF控件适合实现它。
答案 0 :(得分:1)
顶部图片看起来像一个垂直方向的包装面板。
MainWindow.xaml
<Window x:Class="WpfApplication24.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Background="Black"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<Style TargetType="TextBlock">
<Setter Property="Margin" Value="5" />
<Setter Property="Foreground" Value="Black" />
</Style>
<Style TargetType="StackPanel">
<Setter Property="Width" Value="100" />
<Setter Property="Margin" Value="5" />
<Setter Property="Background" Value="Red" />
</Style>
</Window.Resources>
<WrapPanel Orientation="Vertical">
<StackPanel>
<TextBlock Text="A Line" />
</StackPanel>
<StackPanel>
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
</StackPanel>
<StackPanel>
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
</StackPanel>
<StackPanel>
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
</StackPanel>
<StackPanel>
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
</StackPanel>
<StackPanel>
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
</StackPanel>
<StackPanel>
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
</StackPanel>
<StackPanel>
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
<TextBlock Text="A Line" />
</StackPanel>
</WrapPanel>