public override async Task <bool> ShowTabbedPage(Type view, MvxTabbedPagePresentationAttribute attribute, MvxViewModelRequest request)
        {
            if (attribute.Position == TabbedPosition.Tab)
            {
                var page = await CloseAndCreatePage(view, request, attribute);

                var tabHost = GetPageOfType <TabbedPage>();
                if (tabHost == null)
                {
                    tabHost = new TabbedPage();
                    await PushOrReplacePage(FormsApplication.MainPage, tabHost, attribute);
                }

                if (tabHost.Children.Any(p => (p as NavigationPage)?.RootPage.GetType() == page.GetType()))
                {
                    return(true);
                }

                if (attribute.WrapInNavigationPage)
                {
                    tabHost.Children.Add(new NavigationPage(page)
                    {
                        Title           = page.Title,
                        IconImageSource = page.IconImageSource
                    });
                    return(true);
                }

                tabHost.Children.Add(page);
                return(true);
            }

            return(await base.ShowTabbedPage(view, attribute, request));
        }
        public override async Task <bool> ShowTabbedPage(Type view, MvxTabbedPagePresentationAttribute attribute, MvxViewModelRequest request)
        {
            var page = await CloseAndCreatePage(view, request, attribute);

            if (attribute.Position == TabbedPosition.Root)
            {
                if (page is TabbedPage tabbedPageRoot)
                {
                    await PushOrReplacePage(FormsApplication.MainPage, page, attribute);
                }
                else
                {
                    throw new MvxException($"A root page should be of type {nameof(TabbedPage)}");
                }
            }
            else
            {
                var tabHost = GetPageOfType <TabbedPage>();
                if (tabHost == null)
                {
                    tabHost = new TabbedPage();
                    await PushOrReplacePage(FormsApplication.MainPage, tabHost, attribute);
                }

                if (attribute.WrapInNavigationPage)
                {
                    page = CreateNavigationPage(page).Build(tp =>
                    {
                        tp.Title           = page.Title;
                        tp.IconImageSource = page.IconImageSource;
                    });
                }

                tabHost.Children.Add(page);
            }
            return(true);
        }