T
tshad
I am trying to understand the GridSplitter.
If I have the following Grid, it resizes exactly the same whether I have the
GridSplitter or not and regardless of what the ResizeBehavior is.
I thought the "*" and "auto" determined the resizing behavior?
<Grid TextBlock.FontSize="48">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="250"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button Grid.RowSpan="2"
Content="2 Rows"/>
<GridSplitter Grid.Row="0"
Grid.RowSpan="2"
Grid.Column="1"
Width="8"
Background="Black"
ResizeBehavior="CurrentAndNext"
ResizeDirection="Columns"/>
<Button Grid.Column="2"
Grid.ColumnSpan="2"
Content="2 Columns"/>
<Button Grid.Row="1"
Grid.Column="2"
Content="1,2"/>
<Button Grid.Row="1"
Grid.Column="3"
Content="1,3"/>
</Grid>
Thanks,
Tom
If I have the following Grid, it resizes exactly the same whether I have the
GridSplitter or not and regardless of what the ResizeBehavior is.
I thought the "*" and "auto" determined the resizing behavior?
<Grid TextBlock.FontSize="48">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="250"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button Grid.RowSpan="2"
Content="2 Rows"/>
<GridSplitter Grid.Row="0"
Grid.RowSpan="2"
Grid.Column="1"
Width="8"
Background="Black"
ResizeBehavior="CurrentAndNext"
ResizeDirection="Columns"/>
<Button Grid.Column="2"
Grid.ColumnSpan="2"
Content="2 Columns"/>
<Button Grid.Row="1"
Grid.Column="2"
Content="1,2"/>
<Button Grid.Row="1"
Grid.Column="3"
Content="1,3"/>
</Grid>
Thanks,
Tom