Xamarin形式:带圆角的StackLayout [英] Xamarin Forms: StackLayout with rounded corners

查看:556
本文介绍了Xamarin形式:带圆角的StackLayout的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Xamarin Forms PCL开发应用程序.我需要一个带圆角的StackLayout.我也尝试过圆角容器的框架,但是没有可用的角半径属性.我找不到适用于iOS,Android,UWP,Windows 8.1的渲染器.

I am developing an app using Xamarin Forms PCL. I need a StackLayout with rounded corners. I have tried frame as well for rounded corner container but there is no corner radius property available for it. I cannot find renderers for iOS,Android,UWP,Windows 8.1.

请问有人可以建议我如何在所有平台上实现带有圆角以及圆角半径属性的StackLayout.

Please can any one suggest me how to achieve StackLayout with rounded corners along with corner radius property for all the platforms.

推荐答案

您可以使用Frame并将StackLayout放在其中,请注意默认情况下Frame填充20:

You can use Frame and put StackLayout inside , Note Frame take padding 20 by default :

<Frame CornerRadius="10"  
       OutlineColor="Red" 
       Padding="0">
            <StackLayout>

            </StackLayout>
</Frame>

这篇关于Xamarin形式:带圆角的StackLayout的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆