From 8b6f32048554fdaa951a7160c41d45496d859f8f Mon Sep 17 00:00:00 2001 From: Kangho Hur Date: Wed, 14 Jul 2021 10:04:16 +0900 Subject: [PATCH] Bumt to latest - Effects (#1574) - Improve Window and AnimationManager (#1653) - and so on --- .../Core/src/Tizen/Renderers/VisualElementRenderer.cs | 4 ++-- src/Controls/src/Core/Platform/PlatformEffect.cs | 2 ++ src/Core/src/Platform/Tizen/HandlerExtensions.cs | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Compatibility/Core/src/Tizen/Renderers/VisualElementRenderer.cs b/src/Compatibility/Core/src/Tizen/Renderers/VisualElementRenderer.cs index 186c7cce98ac..2878f8992c91 100644 --- a/src/Compatibility/Core/src/Tizen/Renderers/VisualElementRenderer.cs +++ b/src/Compatibility/Core/src/Tizen/Renderers/VisualElementRenderer.cs @@ -902,8 +902,8 @@ void OnFocusChangeRequested(object sender, VisualElement.FocusRequestArgs e) /// The effect to register. void OnRegisterEffect(PlatformEffect effect) { - effect.SetContainer(Element.Parent == null ? null : Platform.GetRenderer(Element.Parent)?.NativeView); - effect.SetControl(NativeView); + effect.Container = Element.Parent == null ? null : Platform.GetRenderer(Element.Parent)?.NativeView; + effect.Control = NativeView; } void OnMoved(object sender, EventArgs e) diff --git a/src/Controls/src/Core/Platform/PlatformEffect.cs b/src/Controls/src/Core/Platform/PlatformEffect.cs index 7d00c80daa0a..ca81a6779452 100644 --- a/src/Controls/src/Core/Platform/PlatformEffect.cs +++ b/src/Controls/src/Core/Platform/PlatformEffect.cs @@ -5,6 +5,8 @@ using PlatformView = Android.Views.View; #elif WINDOWS using PlatformView = Microsoft.UI.Xaml.FrameworkElement; +#elif TIZEN +using PlatformView = ElmSharp.EvasObject; #elif NETSTANDARD using PlatformView = System.Object; #endif diff --git a/src/Core/src/Platform/Tizen/HandlerExtensions.cs b/src/Core/src/Platform/Tizen/HandlerExtensions.cs index f69811a80726..43df1d04043b 100644 --- a/src/Core/src/Platform/Tizen/HandlerExtensions.cs +++ b/src/Core/src/Platform/Tizen/HandlerExtensions.cs @@ -6,7 +6,7 @@ namespace Microsoft.Maui { public static class HandlerExtensions { - public static EvasObject ToNative(this IView view, IMauiContext context) + public static EvasObject ToNative(this IElement view, IMauiContext context) { _ = view ?? throw new ArgumentNullException(nameof(view)); _ = context ?? throw new ArgumentNullException(nameof(context)); @@ -44,12 +44,12 @@ public static void SetWindow(this Window nativeWindow, IWindow window, IMauiCont _ = window ?? throw new ArgumentNullException(nameof(window)); _ = mauiContext ?? throw new ArgumentNullException(nameof(mauiContext)); - var handler = window.Handler as IWindowHandler; + var handler = window.Handler; if (handler == null) - handler = mauiContext.Handlers.GetHandler(window.GetType()) as IWindowHandler; + handler = mauiContext.Handlers.GetHandler(window.GetType()); if (handler == null) - throw new Exception($"Handler not found for view {window} or was not {nameof(IWindowHandler)}'"); + throw new Exception($"Handler not found for view {window}."); handler.SetMauiContext(mauiContext);