The code below does a row-column demonstration of 3 rows where the last row had 3 columns. in each, the second element is a grid splitter.
if splitter's alignment is set to "center", it works as expected to resize others. but if it is set to left/right for horizontal (or top/bottom for vertical) it just shrinks other two while extending its cell (no less than its size)
Can someone explain why does the GridSplitter behave like this? the code is simple WPF code and can be copy-pasted to C# or VB WPF application's main xaml.
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="25"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<DockPanel Grid.Row="0" Background="Lime">
<Label Content="Label" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</DockPanel>
<GridSplitter Grid.Row="1" Height="5" Background="#FF7F7F7F" VerticalAlignment="Center" HorizontalAlignment="Stretch" ResizeDirection="Rows"/>
<DockPanel Grid.Row="2">
<Grid DockPanel.Dock="Top" Margin="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="25"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<DockPanel Grid.Column="0" Background="Red">
<Label Content="Label" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</DockPanel>
<GridSplitter Grid.Column="1" Width="5" Background="#FF7F7F7F" VerticalAlignment="Stretch" HorizontalAlignment="Center" ResizeDirection="Columns"/>
<DockPanel Grid.Column="2" Background="Blue">
<Label Content="Label" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</DockPanel>
</Grid>
</DockPanel>
</Grid>