Xamarin表格网格 - 行高#34; *"在C#?

时间:2015-08-14 08:05:41

标签: c# xamarin xamarin.forms

我知道您可以使用" *"设置行高。以这种方式在XAML中:

 <RowDefinition Height="Auto" />
 <RowDefinition Height="*" />

但C#中的相同表达式返回错误:

new RowDefinition { Height = new GridLength("*", GridUnitType.Auto) },

所以我的问题是如何将网格的行高设置为&#34; *&#34;在C#?

1 个答案:

答案 0 :(得分:19)

array

Screenshot of the above layout on iOS