网格行高
Grid row height
我正在尝试将网格中一行的高度增加到我在 XAML 中添加的项目数,我会把它画出来解释,希望有人能帮助我解决我的问题:
怎么样:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="43"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="54"/>
</Grid.RowDefinitions>
<Button Grid.Row="0" Content="Title"/>
<StackPanel Grid.Row="1" Orientation="Vertical">
<TextBlock Text="Scenario 1" />
<TextBlock Text="Scenario 2" />
<TextBlock Text="Scenario 3" />
</StackPanel>
<Button Grid.Row="2" Content="Add scenario"/>
</Grid>
这不会增加 window,只会增加网格本身。
我正在尝试将网格中一行的高度增加到我在 XAML 中添加的项目数,我会把它画出来解释,希望有人能帮助我解决我的问题:
怎么样:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="43"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="54"/>
</Grid.RowDefinitions>
<Button Grid.Row="0" Content="Title"/>
<StackPanel Grid.Row="1" Orientation="Vertical">
<TextBlock Text="Scenario 1" />
<TextBlock Text="Scenario 2" />
<TextBlock Text="Scenario 3" />
</StackPanel>
<Button Grid.Row="2" Content="Add scenario"/>
</Grid>
这不会增加 window,只会增加网格本身。