public async Task <string> PushPageModelWithNewNavigation <T>(object data, bool animate = true) where T : BaseViewModel
        {
            var page               = ViewModelResolver.ResolvePageModel <T>(data);
            var navigationName     = Guid.NewGuid().ToString();
            var naviationContainer = new NavigationPageContainer(page, navigationName);

            await PushNewNavigationServiceModal(naviationContainer, page.GetModel(), animate);

            return(navigationName);
        }
        public virtual Page AddTab <T>(string title, string icon, object data = null) where T : BaseViewModel
        {
            var page = ViewModelResolver.ResolvePageModel <T>(data);

            page.GetModel().CurrentNavigationServiceName = NavigationServiceName;
            _tabs.Add(page);
            var navigationContainer = CreateContainerPageSafe(page);

            navigationContainer.Title = title;
            if (!string.IsNullOrWhiteSpace(icon))
            {
                navigationContainer.Icon = icon;
            }
            Children.Add(navigationContainer);
            return(navigationContainer);
        }
        public virtual void AddPage <T>(object data = null) where T : BaseViewModel
        {
            var page      = ViewModelResolver.ResolvePageModel <T>(data);
            var pagemodel = page.GetModel();

            pagemodel.CurrentNavigationServiceName = NavigationServiceName;
            _pagesInner.Add(page);
            var navigationContainer = CreateContainerPage(page);

            if (string.IsNullOrEmpty(pagemodel.Title))
            {
                throw new Exception("no Title found for " + pagemodel.GetType().Name);
            }
            _pages.Add(pagemodel.Title, navigationContainer);
            _pageNames.Add(pagemodel.Title);
            if (_pages.Count == 1)
            {
                Detail = navigationContainer;
            }
        }
        private void CreateMenuPage <T>(string masterListName) where T : BaseViewModel
        {
            var masterpage = ViewModelResolver.ResolvePageModel <T>();
            var pagelist   = masterpage.FindByName(masterListName);

            if (pagelist is ListView list)
            {
                list.ItemSelected += (sender, args) =>
                {
                    if (_pages.ContainsKey(((MenuItems)args.SelectedItem).Title))
                    {
                        Detail = _pages[((MenuItems)args.SelectedItem).Title];
                    }
                    IsPresented = false;
                };
            }
            else
            {
                throw new Exception("Master list navigation name not the same as xaml");
            }
            Master = masterpage;
        }
        async Task PushPageModel(BaseViewModel pageModel, object data, bool modal = false, bool animate = true)
        {
            var page = ViewModelResolver.ResolvePageModel(data, pageModel);

            await PushPageModelWithPage(page, pageModel, data, modal, animate);
        }