From f4ae477316834817e80fe63f02139ea83b105d11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=97=88=EA=B0=95=ED=98=B8/Common=20Platform=20Lab=28SR?= =?UTF-8?q?=29/Principal=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Wed, 4 Aug 2021 09:31:29 +0900 Subject: [PATCH] Bump to latest (#71) - Window lifecycle (#1754) - Move New Navigation Handler to Core and make it internal (#1800) - Scrollview handler (#1669) - ScrollView Resize + Window Handler Resize (#1676) - Font AutoScalingEnabled (#1774) - Rename Font Properties (#1755) - Update layout system to ensure native measure/arrange are called for all controls, even from Page subclasses (#1819) - IContainer as IList (#1724) - Implement Layout padding for new StackLayouts and GridLayout (#1749) - Delete all the TabIndex, TabStop, Focusable things! (#1777) - Introduce SetSemanticFocus API via SemanticExtensions (#1829) - Improve Window and AnimationManager (#1653) - And so on --- .../NavigationPageHandler.Tizen.cs | 260 -------------- .../NavigationPageHandler.Tizen.cs | 327 ++++++++++++++++++ .../src/Platform/Tizen/CoreUIAppContext.cs | 2 +- .../src/Platform/Tizen/CoreUIAppExtensions.cs | 25 ++ .../src/Platform/Tizen/HandlerExtensions.cs | 4 +- .../src/Platform/Tizen/SemanticExtensions.cs | 19 + src/Core/src/Platform/Tizen/WrapperView.cs | 4 - 7 files changed, 374 insertions(+), 267 deletions(-) delete mode 100644 src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.Tizen.cs create mode 100644 src/Core/src/Handlers/NavigationPage/NavigationPageHandler.Tizen.cs create mode 100644 src/Core/src/Platform/Tizen/CoreUIAppExtensions.cs create mode 100644 src/Core/src/Platform/Tizen/SemanticExtensions.cs diff --git a/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.Tizen.cs b/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.Tizen.cs deleted file mode 100644 index 188b64746ded..000000000000 --- a/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.Tizen.cs +++ /dev/null @@ -1,260 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Microsoft.Maui.Handlers; -using Microsoft.Maui.Controls.Internals; -using ElmSharp; -using Tizen.UIExtensions.ElmSharp; - -using TButton = Tizen.UIExtensions.ElmSharp.Button; -using TSpan = Tizen.UIExtensions.Common.Span; -using TTextAlignment = Tizen.UIExtensions.Common.TextAlignment; - -namespace Microsoft.Maui.Controls.Handlers -{ - public partial class NavigationPageHandler : - EViewHandler - { - readonly List _naviItemContentPartList = new List(); - TaskCompletionSource _currentTaskSource = null; - IDictionary _naviItemMap; - - Page PreviousPage => VirtualView.Navigation.NavigationStack.Count > 1 ? VirtualView.Navigation.NavigationStack[VirtualView.Navigation.NavigationStack.Count - 2] : null; - NaviItem CurrentNaviItem => NativeView.NavigationStack.Count > 0 ? NativeView.NavigationStack.Last() : null; - NaviItem PreviousNaviItem => NativeView.NavigationStack.Count > 1 ? NativeView.NavigationStack[NativeView.NavigationStack.Count - 2] : null; - - protected override Naviframe CreateNativeView() - { - return new Naviframe(NativeParent) - { - PreserveContentOnPop = true, - DefaultBackButtonEnabled = false, - }; - } - - protected override void ConnectHandler(Naviframe nativeView) - { - base.ConnectHandler(nativeView); - nativeView.AnimationFinished += OnAnimationFinished; - _naviItemMap = new Dictionary(); - - if (VirtualView == null) - return; - - VirtualView.PushRequested += OnPushRequested; - VirtualView.PopRequested += OnPopRequested; - VirtualView.InternalChildren.CollectionChanged += OnPageCollectionChanged; - - foreach (Page page in VirtualView.InternalChildren) - { - _naviItemMap[page] = NativeView.Push(CreateNavItem(page), SpanTitle(page.Title)); - page.PropertyChanged += NavigationBarPropertyChangedHandler; - - UpdateHasNavigationBar(page); - } - } - - protected override void DisconnectHandler(Naviframe nativeView) - { - base.DisconnectHandler(nativeView); - nativeView.AnimationFinished -= OnAnimationFinished; - - VirtualView.PushRequested -= OnPushRequested; - VirtualView.PopRequested -= OnPopRequested; - VirtualView.InternalChildren.CollectionChanged -= OnPageCollectionChanged; - } - - public static void MapPadding(NavigationPageHandler handler, NavigationPage view) { } - - public static void MapBarTextColor(NavigationPageHandler handler, NavigationPage view) - { - handler.UpdateTitle(view.CurrentPage); - } - - public static void MapBarBackground(NavigationPageHandler handler, NavigationPage view) { } - - public static void MapTitleIcon(NavigationPageHandler handler, NavigationPage view) { } - - public static void MapTitleView(NavigationPageHandler handler, NavigationPage view) { } - - void NavigationBarPropertyChangedHandler(object sender, System.ComponentModel.PropertyChangedEventArgs e) - { - // this handler is invoked only for child pages (contained on a navigation stack) - if (e.PropertyName == NavigationPage.HasNavigationBarProperty.PropertyName) - UpdateHasNavigationBar(sender as Page); - else if (e.PropertyName == NavigationPage.HasBackButtonProperty.PropertyName || - e.PropertyName == NavigationPage.BackButtonTitleProperty.PropertyName) - UpdateHasBackButton(sender as Page); - else if (e.PropertyName == Page.TitleProperty.PropertyName) - UpdateTitle(sender as Page); - } - - void OnPageCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) - { - if (e.OldItems != null) - foreach (Page page in e.OldItems) - page.PropertyChanged -= NavigationBarPropertyChangedHandler; - if (e.NewItems != null) - foreach (Page page in e.NewItems) - page.PropertyChanged += NavigationBarPropertyChangedHandler; - } - - void OnPushRequested(object sender, NavigationRequestedEventArgs nre) - { - if (nre.Animated || NativeView.NavigationStack.Count == 0) - { - _naviItemMap[nre.Page] = NativeView.Push(CreateNavItem(nre.Page), SpanTitle(nre.Page.Title)); - _currentTaskSource = new TaskCompletionSource(); - nre.Task = _currentTaskSource.Task; - - // There is no TransitionFinished (AnimationFinished) event after the first Push - if (NativeView.NavigationStack.Count == 1) - CompleteCurrentNavigationTask(); - } - else - { - _naviItemMap[nre.Page] = NativeView.InsertAfter(NativeView.NavigationStack.Last(), CreateNavItem(nre.Page), SpanTitle(nre.Page.Title)); - } - UpdateHasNavigationBar(nre.Page); - } - - void OnPopRequested(object sender, NavigationRequestedEventArgs nre) - { - if (VirtualView.InternalChildren.Count == NativeView.NavigationStack.Count) - { - nre.Page?.SendDisappearing(); - UpdateNavigationBar(PreviousPage, PreviousNaviItem); - - if (nre.Animated) - { - NativeView.Pop(); - - _currentTaskSource = new TaskCompletionSource(); - nre.Task = _currentTaskSource.Task; - - // There is no TransitionFinished (AnimationFinished) event after Pop the last page - if (NativeView.NavigationStack.Count == 0) - CompleteCurrentNavigationTask(); - } - else - { - CurrentNaviItem?.Delete(); - } - - if (_naviItemMap.ContainsKey(nre.Page)) - _naviItemMap.Remove(nre.Page); - } - } - - void OnAnimationFinished(object sender, EventArgs e) - { - CompleteCurrentNavigationTask(); - } - - void CompleteCurrentNavigationTask() - { - if (_currentTaskSource != null) - { - var tmp = _currentTaskSource; - _currentTaskSource = null; - tmp.SetResult(true); - } - } - - void UpdateHasNavigationBar(Page page) - { - NaviItem item = GetNaviItemForPage(page); - item.SetTabBarStyle(); - item.TitleBarVisible = (bool)page.GetValue(NavigationPage.HasNavigationBarProperty); - UpdateBarBackgroundColor(item); - } - - void UpdateNavigationBar(Page page, NaviItem item = null) - { - if (item == null) - item = GetNaviItemForPage(page); - - UpdateTitle(page, item); - UpdateBarBackgroundColor(item); - } - - void UpdateHasBackButton(Page page, NaviItem item = null) - { - if (item == null) - item = GetNaviItemForPage(page); - - TButton button = null; - - if ((bool)page.GetValue(NavigationPage.HasBackButtonProperty) && NativeView.NavigationStack.Count > 1) - { - button = CreateNavigationButton((string)page.GetValue(NavigationPage.BackButtonTitleProperty)); - } - item.SetBackButton(button); - } - - void UpdateTitle(Page page, NaviItem item = null) - { - if (item == null) - item = GetNaviItemForPage(page); - - item.SetTitle(SpanTitle(page.Title)); - } - - string SpanTitle(string Title) - { - TSpan span = new TSpan - { - Text = Title, - HorizontalTextAlignment = TTextAlignment.Center, - ForegroundColor = VirtualView.BarTextColor.ToNative() - }; - return span.GetMarkupText(); - } - - void UpdateBarBackgroundColor(NaviItem item) - { - item.TitleBarBackgroundColor = VirtualView.BarBackgroundColor.ToNativeEFL(); - } - - TButton CreateNavigationButton(string text) - { - var button = new TButton(NativeParent) - { - Text = text - }; - button.SetNavigationBackStyle(); - button.Clicked += (sender, e) => - { - if (!VirtualView.SendBackButtonPressed()) - Tizen.Applications.Application.Current.Exit(); - }; - _naviItemContentPartList.Add(button); - button.Deleted += NaviItemPartContentDeletedHandler; - return button; - } - - void NaviItemPartContentDeletedHandler(object sender, EventArgs e) - { - _naviItemContentPartList.Remove(sender as Widget); - } - - NaviItem GetNaviItemForPage(Page page) - { - NaviItem item; - if (_naviItemMap.TryGetValue(page, out item)) - { - return item; - } - return null; - } - - EvasObject CreateNavItem(Page page) - { - //TODO: Fix me - EvasObject nativeView = (EvasObject)page.Handler.NativeView; - return nativeView; - } - } -} diff --git a/src/Core/src/Handlers/NavigationPage/NavigationPageHandler.Tizen.cs b/src/Core/src/Handlers/NavigationPage/NavigationPageHandler.Tizen.cs new file mode 100644 index 000000000000..454a1084293c --- /dev/null +++ b/src/Core/src/Handlers/NavigationPage/NavigationPageHandler.Tizen.cs @@ -0,0 +1,327 @@ +#nullable enable + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using ElmSharp; +using Microsoft.Maui.Handlers; +using Tizen.UIExtensions.ElmSharp; +using TButton = Tizen.UIExtensions.ElmSharp.Button; +using TSpan = Tizen.UIExtensions.Common.Span; +using TTextAlignment = Tizen.UIExtensions.Common.TextAlignment; + +namespace Microsoft.Maui.Handlers +{ + internal partial class NavigationPageHandler : + ViewHandler, INativeViewHandler + { + readonly List _naviItemContentPartList = new List(); + TaskCompletionSource? _currentTaskSource = null; + IDictionary? _naviItemMap; + + IView? PreviousPage => VirtualView.NavigationStack.Count > 1 ? VirtualView.NavigationStack[VirtualView.NavigationStack.Count - 2] : null; + NaviItem? CurrentNaviItem => NativeView.NavigationStack.Count > 0 ? NativeView.NavigationStack.Last() : null; + NaviItem? PreviousNaviItem => NativeView.NavigationStack.Count > 1 ? NativeView.NavigationStack[NativeView.NavigationStack.Count - 2] : null; + + protected override Naviframe CreateNativeView() + { + return new Naviframe(NativeParent) + { + PreserveContentOnPop = true, + DefaultBackButtonEnabled = false, + }; + } + + private static void PushAsyncTo(NavigationPageHandler arg1, INavigationView arg2, object? arg3) + { + if (arg3 is MauiNavigationRequestedEventArgs args) + arg1.OnPushRequested(args); + } + + private static void PopAsyncTo(NavigationPageHandler arg1, INavigationView arg2, object? arg3) + { + if (arg3 is MauiNavigationRequestedEventArgs args) + arg1.OnPopRequested(args); + } + + void OnPushRequested(MauiNavigationRequestedEventArgs e) + { + _ = _naviItemMap ?? throw new InvalidOperationException($"{nameof(_naviItemMap)} cannot be null."); + + if (e.Animated || NativeView.NavigationStack.Count == 0) + { + _naviItemMap[e.Page] = NativeView.Push(CreateNavItem(e.Page), SpanTitle(e.Page)); + _currentTaskSource = new TaskCompletionSource(); + e.Task = _currentTaskSource.Task; + + // There is no TransitionFinished (AnimationFinished) event after the first Push + if (NativeView.NavigationStack.Count == 1) + CompleteCurrentNavigationTask(); + } + else + { + _naviItemMap[e.Page] = NativeView.InsertAfter(NativeView.NavigationStack.Last(), CreateNavItem(e.Page), SpanTitle(e.Page)); + } + //UpdateHasNavigationBar(nre.Page); + } + + void OnPopRequested(MauiNavigationRequestedEventArgs e) + { + _ = _naviItemMap ?? throw new InvalidOperationException($"{nameof(_naviItemMap)} cannot be null."); + + if (VirtualView.NavigationStack.Count == NativeView.NavigationStack.Count) + { + //e.Page?.SendDisappearing(); + //UpdateNavigationBar(PreviousPage, PreviousNaviItem); + + if (e.Animated) + { + NativeView.Pop(); + + _currentTaskSource = new TaskCompletionSource(); + e.Task = _currentTaskSource.Task; + + // There is no TransitionFinished (AnimationFinished) event after Pop the last page + if (NativeView.NavigationStack.Count == 0) + CompleteCurrentNavigationTask(); + } + else + { + CurrentNaviItem?.Delete(); + } + + if (_naviItemMap.ContainsKey(e.Page)) + _naviItemMap.Remove(e.Page); + } + } + + protected override void ConnectHandler(Naviframe nativeView) + { + base.ConnectHandler(nativeView); + nativeView.AnimationFinished += OnAnimationFinished; + _naviItemMap = new Dictionary(); + + if (VirtualView == null) + return; + + //VirtualView.PushRequested += OnPushRequested; + //VirtualView.PopRequested += OnPopRequested; + //VirtualView.InternalChildren.CollectionChanged += OnPageCollectionChanged; + + foreach (var page in VirtualView.NavigationStack) + { + _naviItemMap[page] = NativeView.Push(CreateNavItem(page), SpanTitle(page)); + //page.PropertyChanged += NavigationBarPropertyChangedHandler; + + //UpdateHasNavigationBar(page); + } + } + + protected override void DisconnectHandler(Naviframe nativeView) + { + base.DisconnectHandler(nativeView); + nativeView.AnimationFinished -= OnAnimationFinished; + + //VirtualView.PushRequested -= OnPushRequested; + //VirtualView.PopRequested -= OnPopRequested; + //VirtualView.InternalChildren.CollectionChanged -= OnPageCollectionChanged; + } + + //public static void MapPadding(NavigationPageHandler handler, INavigationView view) { } + + //public static void MapBarTextColor(NavigationPageHandler handler, INavigationView view) + //{ + // //handler.UpdateTitle(view.CurrentPage); + //} + + public static void MapBarBackground(NavigationPageHandler handler, INavigationView view) { } + + public static void MapTitleIcon(NavigationPageHandler handler, INavigationView view) { } + + public static void MapTitleView(NavigationPageHandler handler, INavigationView view) { } + + //void NavigationBarPropertyChangedHandler(object sender, System.ComponentModel.PropertyChangedEventArgs e) + //{ + // // this handler is invoked only for child pages (contained on a navigation stack) + // if (e.PropertyName == INavigationView.HasNavigationBarProperty.PropertyName) + // UpdateHasNavigationBar(sender as Page); + // else if (e.PropertyName == NavigationPage.HasBackButtonProperty.PropertyName || + // e.PropertyName == NavigationPage.BackButtonTitleProperty.PropertyName) + // UpdateHasBackButton(sender as Page); + // else if (e.PropertyName == Page.TitleProperty.PropertyName) + // UpdateTitle(sender as Page); + //} + + //void OnPageCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) + //{ + // if (e.OldItems != null) + // foreach (Page page in e.OldItems) + // page.PropertyChanged -= NavigationBarPropertyChangedHandler; + // if (e.NewItems != null) + // foreach (Page page in e.NewItems) + // page.PropertyChanged += NavigationBarPropertyChangedHandler; + //} + + //void OnPushRequested(object sender, NavigationRequestedEventArgs nre) + //{ + // if (nre.Animated || NativeView.NavigationStack.Count == 0) + // { + // _naviItemMap[nre.Page] = NativeView.Push(CreateNavItem(nre.Page), SpanTitle(nre.Page.Title)); + // _currentTaskSource = new TaskCompletionSource(); + // nre.Task = _currentTaskSource.Task; + + // // There is no TransitionFinished (AnimationFinished) event after the first Push + // if (NativeView.NavigationStack.Count == 1) + // CompleteCurrentNavigationTask(); + // } + // else + // { + // _naviItemMap[nre.Page] = NativeView.InsertAfter(NativeView.NavigationStack.Last(), CreateNavItem(nre.Page), SpanTitle(nre.Page.Title)); + // } + // UpdateHasNavigationBar(nre.Page); + //} + + //void OnPopRequested(object sender, NavigationRequestedEventArgs nre) + //{ + // if (VirtualView.InternalChildren.Count == NativeView.NavigationStack.Count) + // { + // nre.Page?.SendDisappearing(); + // UpdateNavigationBar(PreviousPage, PreviousNaviItem); + + // if (nre.Animated) + // { + // NativeView.Pop(); + + // _currentTaskSource = new TaskCompletionSource(); + // nre.Task = _currentTaskSource.Task; + + // // There is no TransitionFinished (AnimationFinished) event after Pop the last page + // if (NativeView.NavigationStack.Count == 0) + // CompleteCurrentNavigationTask(); + // } + // else + // { + // CurrentNaviItem?.Delete(); + // } + + // if (_naviItemMap.ContainsKey(nre.Page)) + // _naviItemMap.Remove(nre.Page); + // } + //} + + void OnAnimationFinished(object sender, EventArgs e) + { + CompleteCurrentNavigationTask(); + } + + void CompleteCurrentNavigationTask() + { + if (_currentTaskSource != null) + { + var tmp = _currentTaskSource; + _currentTaskSource = null; + tmp.SetResult(true); + } + } + + //void UpdateHasNavigationBar(IView page) + //{ + // NaviItem item = GetNaviItemForPage(page); + // item.SetTabBarStyle(); + // item.TitleBarVisible = (bool)page.GetValue(NavigationPage.HasNavigationBarProperty); + // UpdateBarBackgroundColor(item); + //} + + //void UpdateNavigationBar(Page page, NaviItem item = null) + //{ + // if (item == null) + // item = GetNaviItemForPage(page); + + // UpdateTitle(page, item); + // UpdateBarBackgroundColor(item); + //} + + //void UpdateHasBackButton(Page page, NaviItem item = null) + //{ + // if (item == null) + // item = GetNaviItemForPage(page); + + // TButton button = null; + + // if ((bool)page.GetValue(NavigationPage.HasBackButtonProperty) && NativeView.NavigationStack.Count > 1) + // { + // button = CreateNavigationButton((string)page.GetValue(NavigationPage.BackButtonTitleProperty)); + // } + // item.SetBackButton(button); + //} + + void UpdateTitle(IView page, NaviItem? item = null) + { + if (item == null) + item = GetNaviItemForPage(page); + + item?.SetTitle(SpanTitle(page)); + } + + string SpanTitle(IView view) + { + if (view is not IPage page) + return string.Empty; + else + { + var span = new TSpan + { + Text = page.Title, + HorizontalTextAlignment = TTextAlignment.Center, + //ForegroundColor = VirtualView.BarTextColor.ToNative() + }; + return span.GetMarkupText(); + } + } + + //void UpdateBarBackgroundColor(NaviItem item) + //{ + // item.TitleBarBackgroundColor = VirtualView.BarBackgroundColor.ToNativeEFL(); + //} + + //TButton CreateNavigationButton(string text) + //{ + // var button = new TButton(NativeParent) + // { + // Text = text + // }; + // button.SetNavigationBackStyle(); + // button.Clicked += (sender, e) => + // { + // if (!VirtualView.SendBackButtonPressed()) + // Tizen.Applications.Application.Current.Exit(); + // }; + // _naviItemContentPartList.Add(button); + // button.Deleted += NaviItemPartContentDeletedHandler; + // return button; + //} + + //void NaviItemPartContentDeletedHandler(object sender, EventArgs e) + //{ + // _naviItemContentPartList.Remove(sender as Widget); + //} + + NaviItem? GetNaviItemForPage(IView page) + { + _ = _naviItemMap ?? throw new InvalidOperationException($"{nameof(_naviItemMap)} cannot be null."); + + NaviItem item; + if (_naviItemMap.TryGetValue(page, out item)) + { + return item; + } + return null; + } + + EvasObject CreateNavItem(IView page) + { + return page.ToNative(MauiContext!); + } + } +} diff --git a/src/Core/src/Platform/Tizen/CoreUIAppContext.cs b/src/Core/src/Platform/Tizen/CoreUIAppContext.cs index f321eeaf1dcc..f5eb0bebe300 100644 --- a/src/Core/src/Platform/Tizen/CoreUIAppContext.cs +++ b/src/Core/src/Platform/Tizen/CoreUIAppContext.cs @@ -100,7 +100,7 @@ public void SetContent(EvasObject content) static Window CreateDefaultWindow() { - return GetPreloadedWindow() ?? new Window("XamarinWindow"); + return GetPreloadedWindow() ?? new Window("MauiDefaultWindow"); } static Window? GetPreloadedWindow() diff --git a/src/Core/src/Platform/Tizen/CoreUIAppExtensions.cs b/src/Core/src/Platform/Tizen/CoreUIAppExtensions.cs new file mode 100644 index 000000000000..c730e41e1cbb --- /dev/null +++ b/src/Core/src/Platform/Tizen/CoreUIAppExtensions.cs @@ -0,0 +1,25 @@ +using System; +using Tizen.Applications; +using EWindow = ElmSharp.Window; + +namespace Microsoft.Maui +{ + internal static class CoreUIAppExtensions + { + public static IWindow GetWindow(this CoreUIApplication application) + { + if (MauiApplication.Current.VirtualWindow != null) + return MauiApplication.Current.VirtualWindow; + + var nativeWindow = MauiApplication.Current.MainWindow; + + foreach (var window in MauiApplication.Current.Application.Windows) + { + if (window?.Handler?.NativeView is EWindow win && win == nativeWindow) + return window; + } + + throw new InvalidOperationException("Window Not Found"); + } + } +} diff --git a/src/Core/src/Platform/Tizen/HandlerExtensions.cs b/src/Core/src/Platform/Tizen/HandlerExtensions.cs index 972948d30527..0118177993e1 100644 --- a/src/Core/src/Platform/Tizen/HandlerExtensions.cs +++ b/src/Core/src/Platform/Tizen/HandlerExtensions.cs @@ -19,10 +19,10 @@ public static EvasObject ToNative(this IView view, IMauiContext context, bool is var handler = view.Handler; if (handler == null) - handler = context.Handlers.GetHandler(view.GetType()) as IViewHandler; + handler = context.Handlers.GetHandler(view.GetType()); if (handler == null) - throw new Exception($"Handler not found for view {view} or was not {nameof(IViewHandler)}."); + throw new Exception($"Handler not found for view {view}."); handler.SetMauiContext(context); diff --git a/src/Core/src/Platform/Tizen/SemanticExtensions.cs b/src/Core/src/Platform/Tizen/SemanticExtensions.cs new file mode 100644 index 000000000000..f641969d5648 --- /dev/null +++ b/src/Core/src/Platform/Tizen/SemanticExtensions.cs @@ -0,0 +1,19 @@ +using System; +using ElmSharp.Accessible; + +namespace Microsoft.Maui +{ + public static partial class SemanticExtensions + { + public static void SetSemanticFocus(this IFrameworkElement element) + { + if (element?.Handler?.NativeView == null) + throw new NullReferenceException("Can't access view from a null handler"); + + if (element.Handler.NativeView is not AccessibleObject) + return; + + //TODO : Need to implement + } + } +} diff --git a/src/Core/src/Platform/Tizen/WrapperView.cs b/src/Core/src/Platform/Tizen/WrapperView.cs index e213a930b60d..119b6083d868 100644 --- a/src/Core/src/Platform/Tizen/WrapperView.cs +++ b/src/Core/src/Platform/Tizen/WrapperView.cs @@ -149,11 +149,7 @@ void OnClipPaint(object? sender, DrawClipEventArgs e) } } -<<<<<<< HEAD void OnLayout(object? sender, LayoutEventArgs e) -======= - void OnLayout(object? sender, Tizen.UIExtensions.Common.LayoutEventArgs e) ->>>>>>> 69d66e477 (Fix build error (#60)) { if (Content != null) {