2

I've working on some page in my app and I just find out Frame.IsClippedToBounds property is not clipping its content. Here is a piece of code in my XAML:

<Frame Padding="0" HeightRequest="100" WidthRequest="100" HasShadow="False" BackgroundColor="White"
    CornerRadius="50" BorderColor="Teal" HorizontalOptions="Center" VerticalOptions="Center"
    IsClippedToBounds="True">
    <Frame.Content>
        <StackLayout BackgroundColor="Silver" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand"/>
    </Frame.Content>
</Frame>

It works perfectly in iOS but not in Android as you can see in the attachments bellow.

iOS

iOS Sample

Android

Android Sample

Saimel Saez
  • 319
  • 4
  • 8

2 Answers2

1

Your attribute HeightRequest is giving you the issue; remove this property and IsClippedToBounds will work

0

This quetion has be reported on GitHub and be fixed. https://github.com/xamarin/Xamarin.Forms/pull/6358

You could update your Xamarin.forms version to latest.

I test on Xamarin.forms 4.3.0.908675. It works well.

enter image description here

Wendy Zang - MSFT
  • 10,509
  • 1
  • 7
  • 17
  • 2
    Hi @Wendy, thanks for replying. I saw that thread on GitHub too. Unfortunatelly it's not working on my side, I'm using XF 4.4.0.991477. Hope there is a solution soon. – Saimel Saez Jan 28 '20 at 15:27
  • I test with the same XF version with you. It still works well. Does any other settings you i missed? You could check on a new project. – Wendy Zang - MSFT Feb 03 '20 at 09:15