title: Use RowSplitter with UniformGrid or something to obtain desired result
body: <p>I am fairly new to wpf so bear with me.</p>
  
  <p>My problem is, I have 4 graph controls placed one above the other that show in a popup window. All 4 are shown originally by default, but after the windows is displayed the user has a choice to un check a checkbox in the ribbon control to turn off one or more of the graphs. I use a UniformGrid because the remaining graphs will auto size to take up the remaining space. </p>
  
  <p>I now need to add a RowSplitter so the user can control the the height of each visible graph. The top of the top graph should be anchored to the top of the window, and the bottom of the bottom graph should be anchored to the bottom of the window. When a user slides the RowSplitter between 2 graphs it should effect the height of both of them.</p>
  
  <p>I have made a simple test project to try and work through.</p>
  
  <pre><code>&lt;Window.Resources&gt;
          &lt;BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" /&gt;
      &lt;/Window.Resources&gt;
      &lt;Grid&gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition Height="30"/&gt;
              &lt;RowDefinition Height="Auto"/&gt;
          &lt;/Grid.RowDefinitions&gt;
  
          &lt;StackPanel Background="LightGray"  Grid.Row="0" Orientation="Horizontal"&gt;
              &lt;CheckBox Content="Graph 1" Name="Graph1Vis" IsChecked="True" HorizontalAlignment="Left"/&gt;
              &lt;CheckBox Content="Graph 2" Name="Graph2Vis" IsChecked="True" HorizontalAlignment="Left"/&gt;
              &lt;CheckBox Content="Graph 3" Name="Graph3Vis" IsChecked="True" HorizontalAlignment="Left"/&gt;
              &lt;CheckBox Content="Graph 4" Name="Graph4Vis" IsChecked="True" HorizontalAlignment="Left"/&gt;
          &lt;/StackPanel&gt;
          &lt;UniformGrid Grid.Row="1" Height="Auto"  Columns="1"&gt;
              &lt;Label Content="Graph 1" Background="Azure" Grid.Row="0" 
                     Visibility="{Binding IsChecked, ElementName=Graph1Vis, Converter={StaticResource BooleanToVisibilityConverter}}"/&gt;
              &lt;GridSplitter Grid.Row="1" Width="Auto" Height="8" Background="DarkSlateBlue"
                          HorizontalAlignment="Stretch" VerticalAlignment="Bottom"/&gt;
          &lt;Label Content="Graph 2" Background="Lavender" Grid.Row="2" 
                 Visibility="{Binding IsChecked, ElementName=Graph2Vis, Converter={StaticResource BooleanToVisibilityConverter}}"/&gt;
              &lt;GridSplitter Grid.Row="3" Width="Auto" Height="8" Background="DarkSlateBlue"
                          HorizontalAlignment="Stretch" VerticalAlignment="Top"/&gt;
          &lt;Label Content="Graph 3" Background="Moccasin" Grid.Row="4"
                 Visibility="{Binding IsChecked, ElementName=Graph3Vis, Converter={StaticResource BooleanToVisibilityConverter}}"/&gt;
              &lt;GridSplitter Grid.Row="5" Width="Auto" Height="8" Background="DarkSlateBlue"
                          HorizontalAlignment="Stretch" VerticalAlignment="Top"/&gt;
          &lt;Label Content="Graph 4" Background="Beige" Grid.Row="6"
                 Visibility="{Binding IsChecked, ElementName=Graph4Vis, Converter={StaticResource BooleanToVisibilityConverter}}"/&gt;
      &lt;/UniformGrid&gt;
      &lt;/Grid&gt;
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>