title: Grid expanding in WPF
body: <p>Hai
  presently i have grid like this.</p>
  
  <p>
          
              
              
              
              
          
          
              
          </p>
  
  <pre><code>    &lt;Grid  Name="tGrid1"  Grid.Row="0" Background="Black" &gt;
      &lt;/Grid&gt;
  
  
  
      &lt;Grid Name="Grid2"  Grid.Row="1"  Background="LightBlue" &gt;
      &lt;/Grid&gt;
  
  
  
      &lt;Grid Name="Grid3"  Grid.Row="2" Background="LightGray" Height="auto" &gt;
  
      &lt;/Grid&gt;
  
  
  
  
      &lt;Grid Name="Grid4"   Grid.Row="3"   Background="LightGreen" &gt;
      &lt;Button HorizontalAlignment="Left" IsEnabled="True" Margin="13.5,5,0,5" Name="TestBtn" Width="50" Click="test_Click" &gt;Test&lt;/Button&gt;
      &lt;/Grid&gt;
  
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>
  
  <p>What i want is, when i click the Test button Grid 1 and Grid 2 has to collapsed and the space has to be occupied with Grid 3.That means the out of total height of 500 of Outer Grid , Grid 3 should occupy height=465 and Grid 4 should ocupy Height=35.
  How can i do this? How should i change my height definitions of Grid ?
  Thanx in advance
  Kaja</p>