I added these changes to the code and it seems to work. But I am not sure wether it's correct way to do so?
// Create some shadowing
if (ShadowEnabled)
{
var frame = ContainerView.Layer.Bounds;
frame.Height = UIScreen.MainScreen.Bounds.Height > UIScreen.MainScreen.Bounds.Width ? UIScreen.MainScreen.Bounds.Height : UIScreen.MainScreen.Bounds.Width;
ContainerView.Layer.ShadowOffset = new CGSize(-5, 0);
ContainerView.Layer.ShadowPath = UIBezierPath.FromRect(frame).CGPath;
ContainerView.Layer.ShadowRadius = 3.0f;
ContainerView.Layer.ShadowColor = UIColor.Black.CGColor;
}
I added these changes to the code and it seems to work. But I am not sure wether it's correct way to do so? // Create some shadowing if (ShadowEnabled) { var frame = ContainerView.Layer.Bounds; frame.Height = UIScreen.MainScreen.Bounds.Height > UIScreen.MainScreen.Bounds.Width ? UIScreen.MainScreen.Bounds.Height : UIScreen.MainScreen.Bounds.Width; ContainerView.Layer.ShadowOffset = new CGSize(-5, 0); ContainerView.Layer.ShadowPath = UIBezierPath.FromRect(frame).CGPath; ContainerView.Layer.ShadowRadius = 3.0f; ContainerView.Layer.ShadowColor = UIColor.Black.CGColor; }