只有Xamarin形式的新手,我使用stackLayout作为一行来显示三个图像。我试图让他们集中在那一行。也许stacklayout不是正确的方法,但我不确定是什么。正如你从图像中看到的那样,它们聚集在一起。我正在寻找他们所有人在那一行上等距离。
var buttonLayout = new StackLayout()
{
Padding = new Thickness(0, 25, 0, 10),
Spacing = 10,
VerticalOptions = LayoutOptions.End,
Orientation = StackOrientation.Horizontal,
HorizontalOptions = LayoutOptions.StartAndExpand
};
答案 0 :(得分:4)
https://stackoverflow.com/a/25338534/5064986 http://developer.xamarin.com/api/type/Xamarin.Forms.LayoutOptions/
var buttonLayout = new StackLayout()
{
Padding = new Thickness(0, 25, 0, 10),
Spacing = 10,
VerticalOptions = LayoutOptions.End,
Orientation = StackOrientation.Horizontal,
HorizontalOptions = LayoutOptions.CenterAndExpand
};