Xamarin 如果行定义中的所有行大小相同,是否需要在*前面指定一个数字?

Xamarin 如果行定义中的所有行大小相同,是否需要在*前面指定一个数字?,xamarin,xamarin.forms,Xamarin,Xamarin.forms,我这样定义行: <Grid.RowDefinitions> <RowDefinition Height="25*" /> <RowDefinition Height="25*" /> <RowDefinition Height="25*" /> <RowDefinition Height="25*" /> </Grid.RowDefinitions> 因为所有的数字都是一样的,所以有必要加上

我这样定义行:

<Grid.RowDefinitions>
    <RowDefinition Height="25*" />
    <RowDefinition Height="25*" />
    <RowDefinition Height="25*" />
    <RowDefinition Height="25*" />
</Grid.RowDefinitions>
因为所有的数字都是一样的,所以有必要加上25吗 这里或者我可以指定为*

如果我完全删除行定义如何。每行的默认高度是否相同?

您不需要*25,如果您这样做:

<Grid.RowDefinitions>
    <RowDefinition Height="*" />
    <RowDefinition Height="*" />
    <RowDefinition Height="*" />
    <RowDefinition Height="*" />
</Grid.RowDefinitions>
所有行的大小都相同。在Xamarin文档中,他们只说列宽的默认值是*所以我们可以假设这里的默认值也可以是星号,但不确定。最好申报