summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/Internals/EffectUtilities.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Core/Internals/EffectUtilities.cs')
-rw-r--r--Xamarin.Forms.Core/Internals/EffectUtilities.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core/Internals/EffectUtilities.cs b/Xamarin.Forms.Core/Internals/EffectUtilities.cs
new file mode 100644
index 00000000..f4fe8323
--- /dev/null
+++ b/Xamarin.Forms.Core/Internals/EffectUtilities.cs
@@ -0,0 +1,16 @@
+namespace Xamarin.Forms.Internals
+{
+ internal static class EffectUtilities
+ {
+ public static void RegisterEffectControlProvider(IEffectControlProvider self, IElementController oldElement, IElementController newElement)
+ {
+ IElementController controller = oldElement;
+ if (controller != null && controller.EffectControlProvider == self)
+ controller.EffectControlProvider = null;
+
+ controller = newElement;
+ if (controller != null)
+ controller.EffectControlProvider = self;
+ }
+ }
+} \ No newline at end of file