Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

How to create a Rounded Stack Layout Control in Xamarin Forms ?

$
0
0

I've created a custom View via Custom rendering but the issue is that it rounds from the all side but I just want to round this from two sides . How to achieve this in Xamarin Forms ?

I've a code for this Control well

class ContentViewRoundedCornersRenderer : VisualElementRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs e)
{
base.OnElementChanged(e);

    if (e.OldElement != null)
    {
        return;
    }

    Layer.CornerRadius = ((ContentViewRoundedCorners) Element).CornerRadius;
}

}


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>