title: c#: Wpf composition- how to block resize Button
body: <p>Good day!</p>
  
  <p>How to composite wpf window-</p>
  
  <p>i have MenuItem, one big TextBox and one Button.</p>
  
  <p>MenuItem shoud resize when user resize window, TextBox-the same thing, but Buttn should stay at place.</p>
  
  <p>I try to do it, but button resezes or "go away" when user resize window:</p>
  
  <pre><code>&lt;Grid&gt;
  
      &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition Width="80*"&gt;&lt;/ColumnDefinition&gt;
          &lt;ColumnDefinition Width="20*"&gt;&lt;/ColumnDefinition&gt;
      &lt;/Grid.ColumnDefinitions&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition Height="8*"&gt;&lt;/RowDefinition&gt;
          &lt;RowDefinition Height="92*"&gt;&lt;/RowDefinition&gt;
  
      &lt;/Grid.RowDefinitions&gt;
  
      &lt;Menu Grid.Row="0" Grid.ColumnSpan="2" Margin="0,0,10,0" HorizontalAlignment="Stretch"&gt;
  
          &lt;MenuItem Header="Settings" Height="24"&gt;
              &lt;MenuItem Header="Load" Click="MenuItem_Click"/&gt;
              &lt;MenuItem Header="Close" Click="MenuItem_Click_1"/&gt;
          &lt;/MenuItem&gt;
  
      &lt;/Menu&gt;
  
      &lt;Grid Grid.Row="1" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" &gt;
          &lt;ScrollViewer Margin="0,0,-10,0"&gt;
              &lt;TextBox HorizontalAlignment="Stretch" Name="tBOutput"  TextWrapping="Wrap" AcceptsReturn="True" Text="TextBox" VerticalAlignment="Stretch"  ScrollViewer.VerticalScrollBarVisibility="Auto"/&gt;
  
          &lt;/ScrollViewer&gt;
  
  
      &lt;/Grid&gt;
  
      &lt;Grid Grid.Row="1" Grid.Column="1" ShowGridLines="True" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MinHeight="200" MinWidth="100" MaxHeight="500" MaxWidth="200" Margin="5,10,-2,0"&gt;
          &lt;Grid.ColumnDefinitions&gt;
              &lt;ColumnDefinition Width="13*"/&gt;
              &lt;ColumnDefinition Width="7*"/&gt;
          &lt;/Grid.ColumnDefinitions&gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition Height="20*"&gt;&lt;/RowDefinition&gt;
              &lt;RowDefinition Height="80*"&gt;&lt;/RowDefinition&gt;
          &lt;/Grid.RowDefinitions&gt;
          &lt;Button Name="startBtn" HorizontalAlignment="Left" VerticalAlignment="Top" Content="Start!" Click="startBtn_Click" Margin="10,10,0,0" Grid.ColumnSpan="2" Height="55" Width="90" /&gt;
  
      &lt;/Grid&gt;
  
  &lt;/Grid&gt;
  </code></pre>