简体   繁体   English

Xamarin形式:滚动视图,底部xaml上固定有按钮

[英]Xamarin Forms: scrollview with button fixed on bottom xaml

I'm new to xamarin forms and xaml and i want try to reproduce this layout in xaml 我是xamarin表单和xaml的新手,我想尝试在xaml中重现此布局 YPlan应用

A scrollable view with an image, then a description and, fixed on bottom, a button (that not scroll with the view) 带有图像的可滚动视图,然后是描述和固定在底部的按钮(不随视图滚动)

How can i achieve this layout in xamarin forms? 如何以xamarin形式实现此布局? I must use StackLayout or Grid? 我必须使用StackLayout还是Grid?

Thanks 谢谢

This should do it. 这应该做。 A stack layout, which contains a scrollview for your scrollable content, then your two buttons under it inside of a horizontal stacklayout. 堆栈布局,其中包含可滚动内容的滚动视图,然后是水平堆栈布局内位于其下方的两个按钮。

<stacklayout>

     <scrollview>
     </scrollview>

     <stacklayout orientation=horizontal>
            <share button>   <get tickets button>
     </stacklayout>

</stacklayout>

I think a StackLayout it's a good choice. 我认为StackLayout是一个不错的选择。 You should have a StackLayout that contains a ScrollView (that contains a StackLayout for Image and Labels) and the StackLayout (Orientation = Horizontal) for "Share" and "Get tickets" buttons (or a Grid for these buttons....) 您应该拥有一个包含ScrollView(包含用于图像和标签的StackLayout)的StackLayout,以及用于“共享”和“获取票证”按钮(或这些按钮的网格)的StackLayout(方向=水平)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM