diff options
author | Samantha Houts <samantha@teamredwall.com> | 2017-03-03 04:41:04 -0800 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2017-03-03 12:41:04 +0000 |
commit | bc13d3cfeeea62214f0c6f434e5f21f7117e2e1a (patch) | |
tree | 5d2e471468e8f754e8e445d2588b0b5fc4508a3c /Xamarin.Forms.ControlGallery.iOS | |
parent | 8871077f115e7ef4d15efaa418fd718089db42c7 (diff) | |
download | xamarin-forms-bc13d3cfeeea62214f0c6f434e5f21f7117e2e1a.tar.gz xamarin-forms-bc13d3cfeeea62214f0c6f434e5f21f7117e2e1a.tar.bz2 xamarin-forms-bc13d3cfeeea62214f0c6f434e5f21f7117e2e1a.zip |
[Android] Don't crash if Control is accessed in Effect OnDetached when Page is Disposed. (#773)
* Add repro for 51505
* [Android] Don't dispose of EffectControlProvider
* Oops
Diffstat (limited to 'Xamarin.Forms.ControlGallery.iOS')
-rw-r--r-- | Xamarin.Forms.ControlGallery.iOS/AppDelegate.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Xamarin.Forms.ControlGallery.iOS/AppDelegate.cs b/Xamarin.Forms.ControlGallery.iOS/AppDelegate.cs index 4ea9b30f..d3107735 100644 --- a/Xamarin.Forms.ControlGallery.iOS/AppDelegate.cs +++ b/Xamarin.Forms.ControlGallery.iOS/AppDelegate.cs @@ -17,8 +17,22 @@ using Xamarin.Forms.Platform.iOS; [assembly: Dependency(typeof(CacheService))] [assembly: ExportRenderer(typeof(DisposePage), typeof(DisposePageRenderer))] [assembly: ExportRenderer(typeof(DisposeLabel), typeof(DisposeLabelRenderer))] +[assembly: ExportEffect(typeof(BorderEffect), "BorderEffect")] namespace Xamarin.Forms.ControlGallery.iOS { + public class BorderEffect : PlatformEffect + { + protected override void OnAttached() + { + Control.BackgroundColor = UIColor.Blue; + } + + protected override void OnDetached() + { + Control.BackgroundColor = UIColor.Brown; + } + } + public class CacheService : ICacheService { public void ClearImageCache() |