Hi, I have found this custom renderer for making shadows on a frame look better, but...
When using the custom renderer I do not have the option for rounded corners anymore.
How do I accomplish both?
[assembly: ExportRenderer(typeof(Frame), typeof(MaterialFrameRenderer))]
namespace md.iOS.CustomRenderers
{
public class MaterialFrameRenderer : FrameRenderer
{
public override void Draw(CGRect rect)
{
base.Draw(rect);
// Update shadow to match better material design standards of elevation
Layer.ShadowRadius = 2.0f;
Layer.ShadowColor = UIColor.Gray.CGColor;
Layer.ShadowOffset = new CGSize(2, 2);
Layer.ShadowOpacity = 0.80f;
Layer.ShadowPath = UIBezierPath.FromRect(Layer.Bounds).CGPath;
Layer.MasksToBounds = false;
}
}
}
Hoping for help and thanks in advance :-)