title: How do I keep the WPF GridSplitter from changing the size of my Grid?
body: <p>WPF GridSplitter makes my Grid wider than my Window!</p>
  
  <p>I've got a WPF Grid with a GridSplitter.  If I resize my columns, then I can make my grid wider than my window and non-viewable.</p>
  
  <p>It starts like this:  </p>
  
  <p><a href="http://img201.imageshack.us/img201/9505/onehg6.jpg" rel="nofollow noreferrer">WPF Grid http://img201.imageshack.us/img201/9505/onehg6.jpg</a></p>
  
  <p>But after widening the left column, I can no longer see the right column (green):  </p>
  
  <p><a href="http://img201.imageshack.us/img201/1804/twomy6.jpg" rel="nofollow noreferrer">WPF GridSplitter http://img201.imageshack.us/img201/1804/twomy6.jpg</a></p>
  
  <p>What am I doing wrong?  How do I keep the GridSplitter from changing the size of my Grid?</p>
  
  <hr>
  
  <p>Update:</p>
  
  <p>I'm still struggling with this.  I've now tried nesting grids within grids.  That didn't help.  Here's my XAML ColumnDefinitions, RowDefinitions, and GridSplitters...</p>
  
  <pre><code>&lt;Window ... &gt;
      &lt;Grid&gt;
          &lt;Grid.ColumnDefinitions&gt;
              &lt;ColumnDefinition Width="*" MinWidth="150" /&gt;
              &lt;ColumnDefinition Width="Auto" /&gt;
              &lt;ColumnDefinition Width="*" MinWidth="400" /&gt;
          &lt;/Grid.ColumnDefinitions&gt;
          &lt;GridSplitter 
              ResizeDirection="Columns"
              ResizeBehavior="BasedOnAlignment"
              Grid.Column="1"
              HorizontalAlignment="Center"
              VerticalAlignment="Stretch"
              Width="2"
              Margin="0,5,0,5"
              Panel.ZIndex="1"/&gt;
          &lt;Grid Grid.Column="0"&gt;
              ...
          &lt;/Grid&gt;
          &lt;Grid Grid.Column="2"&gt;
              &lt;Grid.ColumnDefinitions&gt;
                  &lt;ColumnDefinition Width="*" MinWidth="150" /&gt;
                  &lt;ColumnDefinition Width="Auto" /&gt;
                  &lt;ColumnDefinition Width="*" MinWidth="200" /&gt;
              &lt;/Grid.ColumnDefinitions&gt;
              &lt;GridSplitter 
                  ResizeDirection="Columns"
                  ResizeBehavior="PreviousAndNext"
                  Grid.Column="1"
                  HorizontalAlignment="Center"
                  VerticalAlignment="Stretch"
                  Width="2"
                  Margin="0,5,0,5"
                  Panel.ZIndex="1"/&gt;
              &lt;Grid Grid.Column="0"&gt;
                  ...
              &lt;/Grid&gt;
              &lt;Grid Grid.Column="2"&gt;
                  ...
              &lt;/Grid&gt;
          &lt;/Grid&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <hr>
  
  <p>Update:</p>
  
  <p>I think the problem is with the WebBrowser control.  See new question:</p>
  
  <p><a href="https://stackoverflow.com/questions/375841/wpf-gridsplitter-doesnt-work-with-webbrowser-control">WPF GridSplitter Doesn't Work With WebBrowser Control?</a></p>