我正在用 C#(WPF) 编程。我使用 4 行网格,如下所示:
<Grid>
<Grid.RowDefinitions>
<RowDefinition>
<RowDefinition>
<RowDefinition>
<RowDefinition>
</Grid.RowDefinitions>
<!-- Height of this row is related to its content -->
<Grid Row="0">
</Grid>
<!-- Height of this row is related to its content -->
<Grid Row="1">
</Grid>
<!-- Remaining of Height should be used here... -->
<Grid Row="2">
</Grid>
<!-- Height of this row is related to its content and this row should be stick to bottom of page -->
<Grid Row="3">
</Grid>
</Grid>
根据我的 XAML 代码中的注释:
- 在 Row=0 中,Height 与其内容有关
- 在 Row=1 中,Height 与其内容有关
- 在 Row=3 中,高度与它的内容有关,这一行应该贴在页面底部
- 在 Row=2 中,此处应使用剩余高度
如何根据四个命名条件调整行定义?