title: WPF - Columns don't hide properly when GridSplitter is moved
body: <p>I'm trying to hide a column in a <code>Grid</code> with a <code>GridSplitter</code> when a button is clicked (the button sets the visibility of all items in the third column to collapsed). If I don't move the <code>GridSplitter</code> it works properly and the third column disappear, but if I move the <code>GridSplitter</code> the content disappear but the others columns don't resize to fill the empty space.</p>
  
  <pre><code>&lt;Grid&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition/&gt;
          &lt;RowDefinition Height="25"/&gt;
      &lt;/Grid.RowDefinitions&gt;
  
      &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition x:Name="a" Width="*"/&gt;
          &lt;ColumnDefinition x:Name="b" Width="3"/&gt;
          &lt;ColumnDefinition x:Name="c" Width="Auto" MaxWidth="600"/&gt;
      &lt;/Grid.ColumnDefinitions&gt;
      &lt;Border Grid.Column="0" Grid.Row="0" HorizontalAlignment="Stretch" Background="Green"&gt;
          &lt;Image Source="te/Dante.png" Height="Auto" Margin="0,128,2,71"/&gt;
      &lt;/Border&gt;
      &lt;Button Grid.Column="0" Grid.Row="0" Width="30" Height="30" Margin="0,10,10,0" HorizontalAlignment="Right" VerticalAlignment="Top" Click="Button_Click"&gt;&lt;/Button&gt;
      &lt;GridSplitter Width="5" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" ResizeDirection="Columns" HorizontalAlignment="Left" Background="White" BorderBrush="Black" BorderThickness="1,0" ResizeBehavior="PreviousAndCurrent"/&gt;
      &lt;WrapPanel x:Name="wpC" Grid.Column="2" Grid.Row="0" Grid.RowSpan="2" MinWidth="300" HorizontalAlignment="Stretch" Background="Aqua" Panel.ZIndex="-1"&gt;&lt;/WrapPanel&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>Here is an example of my problem (gif):</p>
  
  <p><a href="https://i.stack.imgur.com/pWLKF.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/pWLKF.gif" alt=""></a></p>
  
  <p>How can i solve this problem? Possibly respecting MVVM pattern.</p>