title: how to nest controls in a groupbox when using WPF
body: <p>I want to layout 2 labels on top of each other and then two buttons horizontally next to each other but below the labels (below is an example of what I would like it to look like)</p>
  
  <p>(All items are centered)</p>
  
  <pre><code>Welcome
  Please Select A Language
  
  English     Spanish
  </code></pre>
  
  <p>Here is my XAML</p>
  
  <pre><code>&lt;Window x:Class="Probation_Sign_In.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Title="MainWindow" Height="768" Width="1024" Closing="Window_Closing" ResizeMode="NoResize" Topmost="True" WindowStartupLocation="CenterScreen" WindowState="Maximized"&gt;
      &lt;Grid&gt;        
          &lt;GroupBox Header="GroupBox" HorizontalAlignment="Left" Height="492" Margin="10,10,0,0" VerticalAlignment="Top" Width="505"&gt;
              &lt;StackPanel&gt;
                  &lt;Label x:Name="labelWelcome" Content="Welcome." HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="48" FontWeight="Bold" Margin="136,55,0,0"/&gt;
                  &lt;Label x:Name="labelWelcomeMessage" Content="Please select a language." HorizontalAlignment="Left" Margin="50,193,0,0" VerticalAlignment="Top" FontSize="36"/&gt;
                  &lt;Button x:Name="englishButton" Content="English" HorizontalAlignment="Center" Margin="109,410,767,297" VerticalAlignment="Center" Width="142" FontSize="20" TouchUp="englishButton_TouchUp" Click="englishButton_Click"&gt;
                      &lt;Button.Background&gt;
                          &lt;LinearGradientBrush EndPoint="0,1" StartPoint="0,0"&gt;
                              &lt;GradientStop Color="#FFF3F3F3" Offset="0"/&gt;
                              &lt;GradientStop Color="#FFEBEBEB" Offset="0.5"/&gt;
                              &lt;GradientStop Color="#FFDDDDDD" Offset="0.5"/&gt;
                              &lt;GradientStop Color="#FF71B5BB" Offset="1"/&gt;
                          &lt;/LinearGradientBrush&gt;
                      &lt;/Button.Background&gt;
                  &lt;/Button&gt;
                  &lt;Button Content="Español" HorizontalAlignment="Center" Margin="269,410,607,300" VerticalAlignment="Center" Width="142" FontSize="20" Height="30"&gt;
                      &lt;Button.Background&gt;
                          &lt;LinearGradientBrush EndPoint="0,1" StartPoint="0,0"&gt;
                              &lt;GradientStop Color="#FFF3F3F3" Offset="0"/&gt;
                              &lt;GradientStop Color="#FFEBEBEB" Offset="0.5"/&gt;
                              &lt;GradientStop Color="#FFDDDDDD" Offset="0.5"/&gt;
                              &lt;GradientStop Color="#FF71B5BB" Offset="1"/&gt;
                          &lt;/LinearGradientBrush&gt;
                      &lt;/Button.Background&gt;
                  &lt;/Button&gt;
              &lt;/StackPanel&gt;
          &lt;/GroupBox&gt;
  
  
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>The above XAML doesn't give me the desired result. But all controls must be inside the GroupBox</p>