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);