【发布时间】:2018-10-22 01:00:40
【问题描述】:
嗨,我需要用水平堆栈布局填充屏幕宽度,但它没有填充
这是我的代码
<StackLayout Orientation="Horizontal" HorizontalOptions="FillAndExpand">
<Entry Placeholder="Nombre" FontSize="14" />
<Entry Placeholder="A. Paterno" FontSize="14" />
<Entry Placeholder="A. Materno" FontSize="14" />
</StackLayout>
我已经尝试过使用 HorizontalOptions = "Fill" 和 "Fill and Expand" 我已经尝试过以这种方式放入 AbsoluteLayout
<AbsoluteLayout>
<StackLayout Orientation="Horizontal" AbsoluteLayout.LayoutBounds="0,0,1,.2" AbsoluteLayout.LayoutFlags="All">
<Entry Placeholder="Nombre" FontSize="14" />
<Entry Placeholder="A. Paterno" FontSize="14" />
<Entry Placeholder="A. Materno" FontSize="14" />
</StackLayout>
</AbsoluteLayout>
还有什么想法吗?
【问题讨论】:
-
将 StackLayout 替换为具有一
auto行和三1*列的 Grid。它应该均匀地划分空间。 -
你想显示所有相同宽度的条目?
标签: xamarin.forms cross-platform