2
我在C#(WPF)中編程。我用網格如下4行:設計網格wpf
<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代碼註釋:
-
在行= 0
- ,身高有關,其內容在行= 1
- ,身高與它的內容行= 3
- ,身高有關,其內容和該行應堅持 頁行= 2
- 的底部,剩餘的身高應該在這裏使用
如何根據四個命名條件調整我的行定義?
This works。具有'*'高度的第三行將確保第四行始終被推到頁面的底部。 – Stewbob