对于Grid的行高和列宽的三类值设置:
- 绝对值:double数值+单位后缀(像素:px 英尺:in 厘米:cm 点:pt)
- 比例值:double数值+*
- 自动值:字符串Auto
绝对值:
Title="MainWindow" Height="350" Width="525">
<Grid ShowGridLines="True" >
<Grid.RowDefinitions>
<RowDefinition Height="30"/>//绝对值
<RowDefinition Height="4"/>//绝对值
<RowDefinition Height="2*"/>比例值
<RowDefinition Height="1*"/>///比例值
</Grid.RowDefinitions>
原图: