【发布时间】:2016-02-25 19:06:43
【问题描述】:
我正在使用 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 代码中的 cmets:
- 在 Row=0 中,高度与其内容相关
- 在 Row=1 中,高度与其内容相关
- Row=3 中,Height 与其内容相关,此行应贴在页面底部
- 在 Row=2 中,此处应使用剩余高度
如何根据四个命名条件调整行定义?
【问题讨论】:
标签: wpf grid rowdefinition