在Xamarin.Forms每个View
有两个属性HorizontalOptions
和VerticalOptions
.两者都是类型LayoutOptions
,可以具有以下值之一:
LayoutOptions.Start
LayoutOptions.Center
LayoutOptions.End
LayoutOptions.Fill
LayoutOptions.StartAndExpand
LayoutOptions.CenterAndExpand
LayoutOptions.EndAndExpand
LayoutOptions.FillAndExpand
显然,它控制父视图上视图的对齐方式.但每个选项的行为究竟如何呢?和Fill
后缀有Expand
什么区别?