【发布时间】:2017-07-30 18:08:05
【问题描述】:
我是 xamarin 表单和 xaml 的新手,我想尝试在 xaml 中重现此布局
带有图像的可滚动视图,然后是描述,底部固定有一个按钮(不随视图滚动)
如何在 xamarin 表单中实现这种布局?我必须使用 StackLayout 还是 Grid?
谢谢
【问题讨论】:
标签: xaml xamarin xamarin.forms
我是 xamarin 表单和 xaml 的新手,我想尝试在 xaml 中重现此布局
带有图像的可滚动视图,然后是描述,底部固定有一个按钮(不随视图滚动)
如何在 xamarin 表单中实现这种布局?我必须使用 StackLayout 还是 Grid?
谢谢
【问题讨论】:
标签: xaml xamarin xamarin.forms
应该这样做。堆栈布局,其中包含可滚动内容的滚动视图,然后是水平堆栈布局内的两个按钮。
<stacklayout>
<scrollview>
</scrollview>
<stacklayout orientation=horizontal>
<share button> <get tickets button>
</stacklayout>
</stacklayout>
【讨论】:
我认为 StackLayout 是一个不错的选择。您应该有一个 StackLayout,其中包含一个 ScrollView(其中包含一个用于图像和标签的 StackLayout)和一个用于“共享”和“获取票证”按钮(或这些按钮的网格......)的 StackLayout(方向 = 水平)
【讨论】: