Created
July 9, 2017 19:58
-
-
Save Stayrony/7b99514e5dd9c6d5f1713af3b7bb6833 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using Xamarin.Forms; | |
| using Xamarin.Forms.Platform.Android; | |
| using Xamarin.Forms.Samples.Controls; | |
| using Xamarin.Forms.Samples.Droid.Renderers; | |
| [assembly: ExportRenderer(typeof(ShadowFrame), typeof(ShadowFrameRenderer))] | |
| namespace Xamarin.Forms.Samples.Droid.Renderers | |
| { | |
| public class ShadowFrameRenderer : FrameRenderer | |
| { | |
| protected override void OnElementChanged(ElementChangedEventArgs<Frame> e) | |
| { | |
| base.OnElementChanged(e); | |
| if (e.NewElement != null) | |
| { | |
| ViewGroup.SetBackgroundResource(Resource.Drawable.shadow_card); | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment