How to make rounded Shape label in Cross Platform with xamarin Form (UWP App)

BoxerBoxer USMember
edited November 2017 in Cross Platform with Xamarin

Hello,
I want to make one label with rounded corner shaped as I searched and tried some samples for this but not helped me more in my UWP xamarin project.
Anyone, please help me on this.

Thanks!

Posts

  • JoeJohnstonJoeJohnston USMember ✭✭

    I'm sad that no one from the community answered or even responded to this post before now.

    Anyway, from what I found you can't make a label rounded on its own.

    Working example to make the following:

        <Frame
    CornerRadius="15"
    Padding="0"
    BackgroundColor="AntiqueWhite"
    Margin="15,10,15,10" 
    HasShadow="False"
        >
        <Label Margin="5" 
            HorizontalOptions="Center" 
            BackgroundColor="Transparent" 
            Text="My rounded label" />
        </Frame>
    

    Things to note are CornerRadius of the frame and the margin and transparent background of the label itself. The width of the 'label' could be set as it is here or managed with the container of your choice. I did not want to complicate the answer with more code.

    HTH

Sign In or Register to comment.