<Page x:Class="test.testviewer"
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:test"
mc:Ignorable="d"
Height="{Binding SystemParameters.PrimaryScreenHeight}"
Width="{Binding SystemParameters.PrimaryScreenWidth}"
MinWidth="300"
Title="testviewer" Loaded="Page_Loaded">
<StackPanel Background="LightGray">
<UniformGrid Rows="4" Height="596" Width="{Binding SystemParameters.PrimaryScreenWidth}">
<DataGrid x:Name="Element" Margin="0,0,0,-249.6" SelectionChanged="Element_SelectionChanged" />
<GroupBox x:Name="Status1" Margin="0,254.6,0,-164.2" Header="Construction" Height="60" VerticalAlignment="Bottom" >
<Grid Height="{Binding SystemParameters.PrimaryScreenHeight}" Width="{Binding SystemParameters.PrimaryScreenWidth}" VerticalAlignment="Bottom">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="95*"/>
<ColumnDefinition Width="192*"/>
</Grid.ColumnDefinitions>
<CheckBox Content="Checkbox" HorizontalAlignment="Left" Margin="0,0,0,-0.4" Width="95" Height="38" VerticalContentAlignment="Center"/>
<TextBox Height="24" Margin="95,0,0,-0.4" TextWrapping="Wrap" Text="TextBox" Width="113" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Grid.ColumnSpan="2"/>
</Grid>
</GroupBox>
<GroupBox x:Name="Status" Margin="0,0,0,-139" Header="Status" Height="122" Width="{Binding SystemParameters.PrimaryScreenWidth}" VerticalAlignment="Bottom" />
</UniformGrid>
<StackPanel Orientation="Horizontal" VerticalAlignment="Bottom">
<Button Content="Button2" HorizontalAlignment="Left" Width="113" Height="25" Margin="10,0,0,10" VerticalAlignment="Bottom"></Button>
<GridSplitter Grid.Column="1" Width="5" HorizontalAlignment="Stretch" Background="LightGray"></GridSplitter>
<Button Content="button1" HorizontalAlignment="Left" Width="113" Height="25" Margin="0,10" VerticalAlignment="Bottom"/>
</StackPanel>
</StackPanel>
</Page>
for the container, I tried different types like grid, stackpanel, uniform grid all give me the same output.