How to implement Rounded Boxview in xamarin?

Best Answer

Answers

  • _albertoms_albertoms MXUniversity ✭✭
    edited March 20

    @NMackay thank you! I'll share the code that shows how I accomplished a rounded view using your suggestion:

    <Frame
        CornerRadius="20"
        Padding="1"
        BackgroundColor="White"
        AbsoluteLayout.LayoutFlags="XProportional">
        <Frame.AbsoluteLayout.LayoutBounds>
            <OnPlatform x:TypeArguments="Rectangle" iOS=".95,80,-1,-1" Android=".95,20,-1,-1" /> 
        </Frame.AbsoluteLayout.LayoutBounds>
        <Label
            WidthRequest="40"
            HeightRequest="40"
            VerticalTextAlignment="Center"
            HorizontalTextAlignment="Center"
            FontSize="10"
            Text="U">
        </Label>
    </Frame>
    

    This code creates a floating button just for prototyping purposes.

Sign In or Register to comment.