protected virtual void OnLayout(object sender, Native.LayoutEventArgs e) { RealControl.Geometry = Control.Geometry; if (_backgroundCanvas.IsValueCreated) { BackgroundCanvas.Geometry = Control.Geometry; } }
protected override void OnBackgroundLayoutUpdated(object sender, Native.LayoutEventArgs e) { base.OnBackgroundLayoutUpdated(sender, e); if (_cliper != null) { _cliper.Geometry = Control.Geometry; if (Element.Content != null) { var nativeView = Platform.GetOrCreateRenderer(Element.Content)?.NativeView; nativeView?.SetClip(null); nativeView?.SetClip(_cliper); } } }
protected override void OnBackgroundLayoutUpdated(object sender, Native.LayoutEventArgs e) { base.OnBackgroundLayoutUpdated(sender, e); _clipper.Geometry = Control.Geometry; _clipper.Invalidate(); }