diff options
Diffstat (limited to 'Xamarin.Forms.Core')
-rw-r--r-- | Xamarin.Forms.Core/Internals/EffectUtilities.cs | 16 | ||||
-rw-r--r-- | Xamarin.Forms.Core/Xamarin.Forms.Core.csproj | 3 |
2 files changed, 18 insertions, 1 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 diff --git a/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj b/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj index dd01d4b2..9bfb7ba2 100644 --- a/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj +++ b/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj @@ -86,6 +86,7 @@ <Compile Include="DataTemplateSelector.cs" /> <Compile Include="DateChangedEventArgs.cs" /> <Compile Include="DelegateLogListener.cs" /> + <Compile Include="Internals\EffectUtilities.cs" /> <Compile Include="EnumerableExtensions.cs" /> <Compile Include="PlatformConfiguration\AndroidSpecific\AppCompat\Application.cs" /> <Compile Include="PlatformConfiguration\AndroidSpecific\Application.cs" /> @@ -461,4 +462,4 @@ </PostBuildEvent> </PropertyGroup> <ItemGroup /> -</Project> +</Project>
\ No newline at end of file |