Xamarin.forms: [Bug] Frame corner radius.

Created on 4 Oct 2019  路  5Comments  路  Source: xamarin/Xamarin.Forms

Description

After updating from v3.6.0.344457 to v4.2.0.848062 frame cease to cut corners of child elements.

Steps to Reproduce

  1. Create frame with any corner radius and NOT ZERO padding.
  2. Create one more frame as a child of the first with any corner radius and ZERO padding.
  3. Into the second frame insert boxview(can be any view)

Expected Behavior

Child elements has cut corners.

Actual Behavior

Child elements don't has cut corners

Code for screenshot

<StackLayout>
    <Frame CornerRadius="5" BackgroundColor="Red" Padding="10">
        <Frame CornerRadius="10" BackgroundColor="Blue" Padding="0">
            <BoxView BackgroundColor="Green" HeightRequest="100" WidthRequest="100"/>
        </Frame>
    </Frame>
</StackLayout>

Screenshots

photo_2019-10-04_16-53-25

4.2.0 1 hacktoberfest 馃嵒 regression in-progress mobcat bug

Most helpful comment

Facing this issue again after upgrading to 4.7.0.968

All 5 comments

@AlexAba What platform do you see this on? Android? iOS? UWP? Can you please attach a small project that demonstrates this issue? Thanks!

Android

It looks like this regressed when the ClipToBounds defaults shifted on Android
If you set the inner frame to Frame IsClippedToBounds="True" then it clips to the radius correctly

This should just be a matter of doing that automatically on the Frame when corner radius is set

closed by #8032

Facing this issue again after upgrading to 4.7.0.968

Was this page helpful?
0 / 5 - 0 ratings