title: Putting stack panels side by side
body: <p>In XAML I am trying to put the two stack panels (in the image) side by side:</p>
  
  <p>![enter image description here][1]</p>
  
  <p>I am trying to use Grid.Row to put the two stack panels in the same row, however I have not been successful. </p>
  
  <p>Below is my code:</p>
  
  <pre><code> &lt;Grid&gt;
                          &lt;Grid.RowDefinitions&gt;
                              &lt;RowDefinition&gt;&lt;/RowDefinition&gt;
                              &lt;RowDefinition &gt;&lt;/RowDefinition&gt;
                          &lt;/Grid.RowDefinitions&gt;
  
                          &lt;Border BorderBrush="Black" BorderThickness="1" Width="auto" Height="auto" Margin="10,0,0,0"&gt;
                          &lt;StackPanel Margin="10,5,279,0" Name="ConnectUpsStackPanel" &gt;
                              &lt;Label Name="ConnectUpsLabel" Height="28" VerticalAlignment="Top" HorizontalAlignment="Left" Width="93"&gt;Connect-Ups&lt;/Label&gt;
  
                                  &lt;Border BorderBrush="Black" BorderThickness="1" Height="235" Grid.Row="1" &gt;
                              &lt;!--Caution Codes Stack--&gt;
                                      &lt;StackPanel HorizontalAlignment="Left" Margin="0,0,0,10" Name="CautionCodeStackPanel" Height="Auto" Orientation="Horizontal" Grid.Row="1"&gt;
                                  &lt;StackPanel Name="CautionCodesReviewStackPanel" &gt;
                                      &lt;GroupBox Header="Caution Codes" Margin="0,0,0,0" HorizontalAlignment="Left" Width="137" BorderThickness="2" Height="217"&gt;
                                          &lt;ScrollViewer VerticalScrollBarVisibility="Visible"&gt;
                                              &lt;Grid Name="grdCautionCodes" Width="104" Background="SeaShell" Height="203"&gt;&lt;/Grid&gt;
                                          &lt;/ScrollViewer&gt;
                                      &lt;/GroupBox&gt;
                                  &lt;/StackPanel&gt;
  
                              &lt;StackPanel&gt;
                                      &lt;Button ToolTip="Create Connect-Up" Margin="0,0,5,0" Width="0.75 in" Click="btnCreateConnectUp_Click" HorizontalAlignment="Left" Height="72"&gt;
                                          &lt;TextBlock FontSize="18" TextAlignment="Center"&gt;Add&lt;/TextBlock&gt;
                                      &lt;/Button&gt;
                                              &lt;Button ToolTip="Delete Connect-Up" Margin="0,0,5,0" Name="btnDeleteConnectUp1" Width="0.75 in" FontSize="11" Click="btnbtnDeleteConnectUp1_Click" Height="0.75 in" &gt;
                                          &lt;TextBlock FontSize="18" TextAlignment="Center"&gt;Delete&lt;/TextBlock&gt;
                                      &lt;/Button&gt;
                                              &lt;Button ToolTip="Delete Connect-Up" Margin="0,0,5,0" Name="btnDeleteConnectUp2" Width="0.75 in" FontSize="11" Click="btnbtnDeleteConnectUp2_Click" Height="0.75 in" f&gt;
                                                  &lt;TextBlock FontSize="18" TextAlignment="Center"&gt;Delete&lt;/TextBlock&gt;
                                              &lt;/Button&gt;
                                          &lt;/StackPanel&gt;
                              &lt;/StackPanel&gt;
                              &lt;/Border&gt;
  
  
  
  
  
                                  &lt;StackPanel Margin="0,0,0,0" Name="ExternalStackPanel" Grid.Row="1" Orientation="Horizontal"&gt;
                                  &lt;Border BorderBrush="Black" BorderThickness="1" Height="226" Margin="0,0,0,0" Width="306"&gt;
  
                                          &lt;WrapPanel Margin="0,0,26,0" x:Name="ExternalWrapPanel"&gt;
  
                                              &lt;StackPanel Margin="0,0,5,0" x:Name="NumberStackPanel" Grid.Column="1" &gt;
                                              &lt;Label HorizontalAlignment="Left" Margin="0,0,0,0"  x:Name="EternalLabel" VerticalAlignment="Top" Width="52" Content="External"/&gt;
                                              &lt;Label HorizontalAlignment="Left" x:Name="pobLabel" VerticalAlignment="Top" Content="Number"/&gt;
                                              &lt;TextBox HorizontalAlignment="Left" x:Name="NumTextBox1" Height="23" Width="130" Text="{Binding POB}" MaxLength="30" /&gt;
                                              &lt;TextBox HorizontalAlignment="Left" Margin="0,5,0,0" x:Name="NumTextBox2" Height="23" Width="130" Text="{Binding POB}" MaxLength="30" /&gt;
                                              &lt;TextBox HorizontalAlignment="Left" Margin="0,5,0,0" x:Name="NumTextBox3" Height="23" Width="130" Text="{Binding POB}" MaxLength="30"  /&gt;
                                              &lt;TextBox HorizontalAlignment="Left" Margin="0,5,0,0" x:Name="NumTextBox4" Height="23" Width="130" Text="{Binding POB}" MaxLength="30"/&gt;
                                              &lt;TextBox HorizontalAlignment="Left" Margin="0,5,0,0" x:Name="NumTextBox5" Height="23" Width="130" Text="{Binding POB}" MaxLength="30"/&gt;
                                              &lt;TextBox HorizontalAlignment="Left" Margin="0,5,0,0" x:Name="NumTextBox6" Height="23" Width="130" Text="{Binding POB}" MaxLength="30" my:SearchProps.SearchType="PersonPlaceOfBirth"/&gt;
  
                                          &lt;/StackPanel&gt;
                                          &lt;StackPanel Margin="5,25,0,0" x:Name="PersonStackPanel" Height="197"&gt;
                                              &lt;Label x:Name="PersonLabel" Height="28" VerticalAlignment="Top" HorizontalAlignment="Left" Width="58" Content="Person"/&gt;
                                              &lt;telerik:ComboBox DisplayMemberPath="NAME" Height="23" ItemsSource="{Binding}" x:Name="PersonyComboBox1" /&gt;
                                              &lt;telerik:ComboBox Margin="0,5,0,0" DisplayMemberPath="NAME" Height="23" ItemsSource="{Binding}" x:Name="PersonComboBox2" /&gt;
                                              &lt;telerik:ComboBox Margin="0,5,0,0" DisplayMemberPath="NAME" Height="23" ItemsSource="{Binding}" x:Name="PersonComboBox3" /&gt;
                                              &lt;telerik:ComboBox Margin="0,5,0,0" DisplayMemberPath="NAME" Height="23" ItemsSource="{Binding}" x:Name="PersonComboBox4" /&gt;
                                              &lt;telerik:ComboBox Margin="0,5,0,0" DisplayMemberPath="NAME" Height="23" ItemsSource="{Binding}" x:Name="PersonComboBox5" /&gt;
                                              &lt;telerik:ComboBox Margin="0,5,0,0" DisplayMemberPath="NAME" Height="23" ItemsSource="{Binding}" x:Name="PersonComboBox6" /&gt;
  
                                          &lt;/StackPanel&gt;
  
  
  
                                      &lt;/WrapPanel&gt;
  
                                  &lt;/Border&gt;
                              &lt;/StackPanel&gt;
  
                          &lt;/StackPanel&gt;
                      &lt;/Border&gt;
  
                      &lt;/Grid&gt;
  </code></pre>