Home > Software design >  IsClippedToBounds does not work in xamarin form
IsClippedToBounds does not work in xamarin form

Time:09-17

I used Frame and IsClippedToBounds to add cornerRadius to my image but it does not work.

<Frame CornerRadius="10" BackgroundColor="White" IsClippedToBounds="True" Padding="0">
     <Image Source="House.jpg" Aspect="AspectFill"/>
</Frame>

enter image description here

CodePudding user response:

You code is supposed to work , this is running screenshot on my side with your code .

enter image description here

I'm not aware of the cause but as a woakround you can use ImageButton instead of Frame Image.

The usage is pretty simple

<ImageButton Aspect="AspectFill" CornerRadius="10" IsEnabled="False" Source="House.jpg"/>
  • Related