I'm using the below code to create a 3 column layout with grids.
<Window x:Class="WpfApplication21.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid Column="0" Background="Aqua"></Grid>
<Grid Column="1" Background="Red"></Grid>
<Grid Column="2" Background="Yellow"></Grid>
</Grid>
</Window>
The part I don't understand is that when I set the Visibility
of the third grid to Collapsed
the space it takes is still there. I want the remaining space to be added to other two grids.
<Grid Column="2" Background="Yellow" Visibility="Collapsed"></Grid>