After upgrading from Forms from 4.6.0.726 to 4.6.0.967
frames on iOS stopped clipping content, tested with a grid inside.
Edit: Last good version checked 4.6.0.847 is okay.
<frame CornerRadius="something" IsClippedToBounds="True">
<grid>
<image/><or whatever/>
</grid>
<frame>
Please kindly check here:
https://forums.xamarin.com/discussion/comment/414472
frame to clip content while IsClippedToBounds="True"
Not clipping content while IsClippedToBounds="True"
https://forums.xamarin.com/discussion/comment/414472 confirmed by xamarin staff, LeonLu.
credits to LeonLu
```
[assembly: ExportRenderer(typeof(Frame), typeof(FrameFix))]
namespace Your.iOS.Renderers
{
protected override void OnElementChanged(ElementChangedEventArgs e)
{
base.OnElementChanged(e);
if (e.OldElement != null && Control != null)
{
Control.PropertyChanged -= OnControlPropertyChanged;
}
if (e.NewElement!=null && NativeView != null)
{
Control = e.NewElement;
Control.PropertyChanged += OnControlPropertyChanged;
UpdateCorners();
}
}
protected void UpdateCorners()
{
NativeView.Layer.AllowsEdgeAntialiasing = true;
NativeView.Layer.MasksToBounds = Control.IsClippedToBounds;
NativeView.Layer.CornerRadius = Control.CornerRadius;
}
private void OnControlPropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (NativeView == null || Control == null)
return;
if (e.PropertyName == "IsClippedToBounds"
|| e.PropertyName == "CornerRadius")
{
UpdateCorners();
}
}
}
```
Already solved in nightly build version Xamarin.Forms nighly build 4.8.0.908
Just adding that UWP also works, it is really only iOS.
Is this one going to be fixed on 4.6.0?
I've just upgraded to 4.7.1080 and this behaviour is still happening; the release notes mentioned there was a fix for #11031
closed by #11129
Most helpful comment
I've just upgraded to 4.7.1080 and this behaviour is still happening; the release notes mentioned there was a fix for #11031