summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.ControlGallery.iOS
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.ControlGallery.iOS')
-rw-r--r--Xamarin.Forms.ControlGallery.iOS/AppDelegate.cs14
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()