【发布时间】:2015-07-26 17:51:54
【问题描述】:
有没有办法创建一个垂直堆栈布局,其中一个按钮占父项的 30%,文本输入占父项的 70%?像这样的:
<StackLayout Orientation="Vertical">
<Entry Height="70%"></Entry>
<Button Height="30%">Click me</Button>
</StackLayout>
但这不起作用。到目前为止,唯一的解决方案是创建一个完整的 Grid 项目并使用它。没有其他解决方案吗?
【问题讨论】:
-
我不认为你可以直接使用高度。有点晚了,但尝试使用 HeightRequest 属性。
标签: xaml xamarin xamarin.forms