diff --git a/src/Controls/src/Core/Platform/AlertManager/AlertManager.Tizen.cs b/src/Controls/src/Core/Platform/AlertManager/AlertManager.Tizen.cs index 402f51f355ad..7273063ee80f 100644 --- a/src/Controls/src/Core/Platform/AlertManager/AlertManager.Tizen.cs +++ b/src/Controls/src/Core/Platform/AlertManager/AlertManager.Tizen.cs @@ -319,9 +319,9 @@ void OnPromptRequested(Page sender, PromptArguments args) prompt.Dismissed += (s, e) => _alerts.Remove(prompt); } - bool PageIsInThisContext(IPage page) + bool PageIsInThisContext(IView sender) { - var context = page.Handler?.MauiContext ?? null; + var context = sender.Handler?.MauiContext ?? null; return context == MauiContext; } } diff --git a/src/Core/src/Handlers/NavigationPage/NavigationPageHandler.Tizen.cs b/src/Core/src/Handlers/NavigationPage/NavigationPageHandler.Tizen.cs index 454a1084293c..976499e8305e 100644 --- a/src/Core/src/Handlers/NavigationPage/NavigationPageHandler.Tizen.cs +++ b/src/Core/src/Handlers/NavigationPage/NavigationPageHandler.Tizen.cs @@ -266,13 +266,13 @@ void UpdateTitle(IView page, NaviItem? item = null) string SpanTitle(IView view) { - if (view is not IPage page) + if (view is not ITitledElement page) return string.Empty; else { var span = new TSpan { - Text = page.Title, + Text = page.Title??string.Empty, HorizontalTextAlignment = TTextAlignment.Center, //ForegroundColor = VirtualView.BarTextColor.ToNative() }; diff --git a/src/Core/src/Handlers/Page/PageHandler.Tizen.cs b/src/Core/src/Handlers/Page/PageHandler.Tizen.cs index 4ca0c6bc1163..a4ec8beceef7 100644 --- a/src/Core/src/Handlers/Page/PageHandler.Tizen.cs +++ b/src/Core/src/Handlers/Page/PageHandler.Tizen.cs @@ -6,7 +6,7 @@ namespace Microsoft.Maui.Handlers { - public partial class PageHandler : ViewHandler, INativeViewHandler + public partial class PageHandler : ViewHandler, INativeViewHandler { INativeViewHandler? _contentHandler; @@ -35,11 +35,11 @@ protected override void DisconnectHandler(Page nativeView) nativeView.LayoutUpdated -= OnLayoutUpdated; } - public static void MapTitle(PageHandler handler, IPage page) + public static void MapTitle(PageHandler handler, IView page) { } - public static void MapContent(PageHandler handler, IPage page) + public static void MapContent(PageHandler handler, IView page) { handler.UpdateContent(); } @@ -76,11 +76,15 @@ void UpdateContent() _contentHandler?.Dispose(); _contentHandler = null; - NativeView.Children.Add(VirtualView.Content.ToNative(MauiContext)); - if (VirtualView.Content.Handler is INativeViewHandler thandler) + if (VirtualView is IContentView cv && cv.Content is IView view) { - thandler?.SetParent(this); - _contentHandler = thandler; + NativeView.Children.Add(view.ToNative(MauiContext)); + + if (view.Handler is INativeViewHandler thandler) + { + thandler?.SetParent(this); + _contentHandler = thandler; + } } } } diff --git a/src/Core/src/Platform/Tizen/SemanticExtensions.cs b/src/Core/src/Platform/Tizen/SemanticExtensions.cs index f641969d5648..6a4c0bbc720e 100644 --- a/src/Core/src/Platform/Tizen/SemanticExtensions.cs +++ b/src/Core/src/Platform/Tizen/SemanticExtensions.cs @@ -5,7 +5,7 @@ namespace Microsoft.Maui { public static partial class SemanticExtensions { - public static void SetSemanticFocus(this IFrameworkElement element) + public static void SetSemanticFocus(this IView element) { if (element?.Handler?.NativeView == null) throw new NullReferenceException("Can't access view from a null handler");