---
title: "Automatically resize WPF Grid Column"  
description: "Automatically resize WPF Grid Column"  
author: "Anonymous User"  
published: 2013-10-14  
updated: 2013-10-14  
canonical: https://www.mindstick.com/forum/1676/automatically-resize-wpf-grid-column  
category: "wpf"  
tags: ["wpf"]  
reading_time: 2 minutes  

---

# Automatically resize WPF Grid Column

```
<Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="5"/>
            <ColumnDefinition Width="200"/>
        </Grid.ColumnDefinitions>


        <!-- Browser -->
        <my:WebControl Visibility="{Binding IsIEVisible,Converter={StaticResource BoolToVisibleconverter}}" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Name="webControl1">

        </my:WebControl>

        <GridSplitter Visibility="{Binding isVisiblePult, Converter={StaticResource BoolToVisibleconverter}}" HorizontalAlignment="Center" VerticalAlignment="Stretch" Width="5" Grid.RowSpan="2" Grid.Column="1"/>

        <Grid Visibility="{Binding isVisiblePult, Converter={StaticResource BoolToVisibleconverter}}" Grid.Column="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <ListBox x:Name="ListChannels" Grid.Row="1" SelectedItem="{Binding SelectedChannel}" ItemsSource="{Binding Channels}" FontSize="14" Background="#FFD4ECFF">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock FontSize="17" Text="{Binding Name}"/>
                    </DataTemplate>
                </ListBox.ItemTemplate>

            </ListBox>
        </Grid>
```

## Replies

### Reply by Aaron Douglas

Make the second and third column definitions "Auto", and then set explicit widths on your grid splitter and second Grid. Then when you collapse them the main grid will behave as you require.


---

Original Source: https://www.mindstick.com/forum/1676/automatically-resize-wpf-grid-column

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
