title: WPF grid row height doesn't match the height that I input
body: <p>I've been pulling my hair out all day on this.  For some reason when I set up my grid while I'm using some custom controls the actual height of the grid rows changes around and doesn't bother to use the height values that I give it.  I originally thought it was because I was loading in custom controls in the code, but even when I take the custom controls out the problem remains.  Here's what I have for the xaml</p>
  
  <pre><code>&lt;Window x:Class="Pokemon_Planner.PokePlan"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="PokePlan" Height="600" Width="800"&gt;
  &lt;Grid x:Name="myGrid"&gt;
  
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition Height="25" Name="row0"&gt;&lt;/RowDefinition&gt;
          &lt;RowDefinition Height="Auto" Name="row1"&gt;&lt;/RowDefinition&gt;
          &lt;RowDefinition Height="48" Name="row2"&gt;&lt;/RowDefinition&gt;
          &lt;RowDefinition Height="Auto"&gt;&lt;/RowDefinition&gt;
          &lt;RowDefinition Height="Auto"&gt;&lt;/RowDefinition&gt;
          &lt;RowDefinition Height="Auto"&gt;&lt;/RowDefinition&gt;
      &lt;/Grid.RowDefinitions&gt;
      &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition Width="Auto"&gt;&lt;/ColumnDefinition&gt;
          &lt;ColumnDefinition Width="Auto"&gt;&lt;/ColumnDefinition&gt;
      &lt;/Grid.ColumnDefinitions&gt;
      &lt;StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="0"&gt;
          &lt;ComboBox Name="cmbSort" Width="100"&gt;
              &lt;ComboBoxItem Content="Name"&gt;&lt;/ComboBoxItem&gt;
              &lt;ComboBoxItem Content="Type"&gt;&lt;/ComboBoxItem&gt;
              &lt;ComboBoxItem Content="Element"&gt;&lt;/ComboBoxItem&gt;
              &lt;ComboBoxItem Content="BP"&gt;&lt;/ComboBoxItem&gt;
              &lt;ComboBoxItem Content="Min Damage"&gt;&lt;/ComboBoxItem&gt;
              &lt;ComboBoxItem Content="Max Damage"&gt;&lt;/ComboBoxItem&gt;
          &lt;/ComboBox&gt;
          &lt;Button Name="btnSort" Click="btnSort_Click"&gt;Sort&lt;/Button&gt;
          &lt;Button Name="btnRefresh" Click="btnRefresh_Click"&gt;Refresh&lt;/Button&gt;
          &lt;Button Name="btnFilter"&gt;Filter&lt;/Button&gt;
      &lt;/StackPanel&gt;
      &lt;StackPanel Grid.Column="0" Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Top" Name="stkMoveSet1"&gt;
  
      &lt;/StackPanel&gt;
      &lt;StackPanel Grid.Column="0" Grid.Row="3" Orientation="Horizontal" Name="stkMoveSet2"&gt;
  
      &lt;/StackPanel&gt;
      &lt;ScrollViewer Grid.Row="1" Grid.Column="1" Grid.RowSpan="6" Height="Auto" Name="scrollViewerMoves" &gt;
          &lt;StackPanel Grid.Row="1" Grid.Column="1" Grid.RowSpan="6" Name="moveStackPanel"&gt;&lt;/StackPanel&gt;
      &lt;/ScrollViewer&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>
  
  <p>The row that was set to have a height of 48 still had that height set, but the 'actual height' was 446 which is still really screwing my grid up.  The numbers vary and I've tried a lot of different combinations between set numbers and auto but I can't seem to get this one window to behave correctly.  Any ideas?</p>