title: Automatically resize WPF Grid Column
body: <p>I have a WPF Application, which contains Grid Element with two columns.
  The second column also contains grid element.
  I have a timer and after 5 seconds the second grid's visibility becomes collapsed, but first column doesn't resize.</p>
  
  <p>It is possible to automatically resize first column ( to fit the whole window after setting second grid's visibility to collapsed?</p>
  
  <pre><code>-----------------------|
  |               |      |
  |               |grid2 |
  |               |      |
  |               |      |
  |--------------------- |
  
  
  &lt;Grid&gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition Height="*"/&gt;
          &lt;/Grid.RowDefinitions&gt;
          &lt;Grid.ColumnDefinitions&gt;
              &lt;ColumnDefinition Width="*"/&gt;
              &lt;ColumnDefinition Width="5"/&gt;
              &lt;ColumnDefinition Width="200"/&gt;
          &lt;/Grid.ColumnDefinitions&gt;
  
  
          &lt;!-- Browser --&gt;
          &lt;my:WebControl Visibility="{Binding IsIEVisible,Converter={StaticResource BoolToVisibleconverter}}" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Name="webControl1"&gt;
  
          &lt;/my:WebControl&gt;
  
          &lt;GridSplitter Visibility="{Binding isVisiblePult, Converter={StaticResource BoolToVisibleconverter}}" HorizontalAlignment="Center" VerticalAlignment="Stretch" Width="5" Grid.RowSpan="2" Grid.Column="1"/&gt;
  
          &lt;Grid Visibility="{Binding isVisiblePult, Converter={StaticResource BoolToVisibleconverter}}" Grid.Column="2"&gt;
              &lt;Grid.RowDefinitions&gt;
                  &lt;RowDefinition Height="*"/&gt;
              &lt;/Grid.RowDefinitions&gt;
              &lt;ListBox x:Name="ListChannels" Grid.Row="1" SelectedItem="{Binding SelectedChannel}" ItemsSource="{Binding Channels}" FontSize="14" Background="#FFD4ECFF"&gt;
                  &lt;ListBox.ItemTemplate&gt;
                      &lt;DataTemplate&gt;
                          &lt;TextBlock FontSize="17" Text="{Binding Name}"/&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/ListBox.ItemTemplate&gt;
  
              &lt;/ListBox&gt;
          &lt;/Grid&gt;
  </code></pre>