Reputation: 7601
Hello I am working on POS(Point of Sales) system in that I have to display the order in below mentioned image
I have tried with Wrap panel but it will generate the Grid like
see it will take maximum height for all grid I want to implement exactly same as image1 can anyone please help which WPF Control is suitable to fulfill it.
Upvotes: 1
Views: 228
Reputation: 4322
The top picture looks like a wrap panel with vertical orientation to me.
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>
Upvotes: 1