I want to add shadow to a button in Xamarin on Android as well as iOS.
I want to produce design:
I have tried customizing button on Xamarin.Android with following code:
protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.Button> e)
Control.SetShadowLayer(10, 10, 10, Android.Graphics.Color.Rgb((int)e.NewElement.BackgroundColor.R, (int)e.NewElement.BackgroundColor.G, (int)e.NewElement.BackgroundColor.B)); this.Elevation = 50; }
But it does not produce color shadow around the border. I have also tried to use framerenderer with HasShadow property to work as a Button. But no luck.