title: Adding child controls to a WrapPanel
body: <p><em>I am very much new to WPF.</em></p>
  
  <p>I have a very simple problem.</p>
  
  <p>I have a stackpanel spTerminalBox.</p>
  
  <pre><code>&lt;Grid&gt;
      &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition Width="300"/&gt;
          &lt;ColumnDefinition Width="881*"/&gt;
          &lt;ColumnDefinition Width="11*"/&gt;
      &lt;/Grid.ColumnDefinitions&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition Height="156"/&gt;
          &lt;RowDefinition Height="371*"/&gt;
      &lt;/Grid.RowDefinitions&gt;
      &lt;my:WindowHeader x:Name="title" Title="Internet Cafe management software (ICM)"   CloseClicked="window_CloseClicked"   VerticalAlignment="Top" Margin="0,-1,0,0" Grid.ColumnSpan="3" /&gt;
      &lt;StackPanel Name ="spTerminalBox" Grid.Column="1" Grid.Row="1" Orientation="Horizontal" Margin="10,10,10,20"/&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>My xaml structure is that.</p>
  
  <p>I am filling a user control in that stackpanel dynamically in code.
  Once if child elements on a StackPanel do not fit in the StackPanel area, then it should not go outside of the visible area, it should come down.</p>
  
  <p>How to achieve this ?</p>