如何制作圆角条目控件Xamarin.Forms [英] How to make Round corner Entry Control Xamarin.Forms

查看:444
本文介绍了如何制作圆角条目控件Xamarin.Forms的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须在Xamarin.Forms中使用圆角输入,但是对此我没有任何解决方案.

I have to use round corner entry in Xamarin.Forms, but I have not get any solution for this.

我正在尝试获得这种外观:

I am trying to get this look and feel:

请帮助我解决此问题.

Please help me with this issue.

推荐答案

我不确定这种方法是否存在问题,因为它看起来很简单,但没人建议.

I'm not sure if there's something wrong with this approach or not, because it seems so simple but no one's suggesting it.

但是我不明白为什么不能只将IsClippedToBounds设置为trueFrame使用.这样可以为您提供一个内置的拐角半径,然后您可以根据需要进行调整.

But I don't see why you can't just use a Frame with IsClippedToBounds set to true. That gives you a built-in corner radius, which you can then adjust as needed.

        <Grid>               
             <Frame
                   Padding = "0"
                   CornerRadius     ="20"
                   IsClippedToBounds="true">
                <Editor [...whatever...]/>
            </Frame>
         </Grid>

我目前正在使用此解决方案,并且对我有效.

I'm currently using this solution and it works for me.

这篇关于如何制作圆角条目控件Xamarin.Forms的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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