我有一个有3行的网格。当我向下拖动到网格分割器时,网格分割器消失了。但我需要做" auto"第一行的高度。我该如何解决这个问题?
这是代码:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="20"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel>
<Border Background="BlueViolet" Height="20" Margin="3"/>
<Border Background="BlueViolet" Height="20" Margin="3"/>
<Border Background="BlueViolet" Height="20" Margin="3"/>
<Border Background="BlueViolet" Height="20" Margin="3"/>
<Border Background="BlueViolet" Height="20" Margin="3"/>
</StackPanel>
<GridSplitter Background="White" HorizontalAlignment="Stretch" Grid.Row="1" Height="5"/>
<TextBlock IsHitTestVisible="False" Text="GridSplitter here.." Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<Border Background="CornflowerBlue" Grid.Row="2" Margin="3"/>
</Grid>
感谢您的帮助。