xamarin forms stacklayout rounded corners

GSInsanGSInsan USMember ✭✭

Hi,

How we set stacklayout rounded corners in Xamarin Forms.

Please Help.
Thanks

Posts

  • OSDMobileOSDMobile NLUniversity ✭✭
    edited November 2015

    If you want rounded corners I recommend to use a Frame

    https://developer.xamarin.com/api/type/Xamarin.Forms.Frame/

  • AshokAshAshokAsh USMember ✭✭
    edited August 2017

    in my case I used framerenderer to use custom border colour for Xamarin.droid in Xamarin.forms! so, if use frame anywhere in application it shows that custom border color ! then what to do?

  • seanydaseanyda GBMember ✭✭✭✭✭

    @Ashokkumaar said:
    in my case I used framerenderer to use custom border colour for Xamarin.droid in Xamarin.forms! so, if use frame anywhere in application it shows that custom border color ! then what to do?

    Make a class that inherits from Frame and make the Custom Renderer update the FrameBorder class not the actual Frame.

    public class FrameBorder : Frame {
    
    }
    
  • AshokAshAshokAsh USMember ✭✭
    edited August 2017

    How to update custom renderer with FrameBorder?Now Frameborder class also Act as Frame then it goes to frame renderer then update the predefined bordercolor?

  • leo-mckleo-mck BRMember ✭✭

    @Ashokkumaar said:
    How to update custom renderer with FrameBorder?Now Frameborder class also Act as Frame then it goes to frame renderer then update the predefined bordercolor?

    Your custom renderer should target your custom control, not Frame. So, on your custom renderer, change

    [assembly: ExportRenderer(typeof(Frame), typeof(FrameRenderer))]

    to

    [assembly: ExportRenderer(typeof(MyCustomFrame), typeof(FrameRenderer))]

    Assuming you have a

    class MyCustomFrame : Frame{}

    this way, your custom renderer will only be called when you use MyCustomFrame and Xamarin will use the default renderer for Frame.

  • AshokAshAshokAsh USMember ✭✭

    Now I understand Thanks @leo-mck @seanyda

Sign In or Register to comment.