示例#1
0
        public App()
        {
            InitializeComponent();

            //var initialPage = FreshPageModelResolver.ResolvePageModel<MainViewModel>();

            // MainPage = new FreshNavigationContainer(initialPage);

            /* Para empezar el freshMVVM
             * Descargar primero el noguts FreshMVVM, si se desea bajar bogus
             * bogus es para simular el llenado de datos
             * tambien las carpetas Models, View = Pages ahora se pone asi por el FreshMVVM
             * en el ViewModels ya no se usara el MainPageViewModel ahora es = MainViewModel
             * Tambien instalar el nuget para evitar poner el onChangePropertyChange nuget = " PropertyChanged.Fody - Version 2.5.13 "
             * y se agrega un xml llamado FodyWeavers.xml
             *
             */

            var masterDetail = new FreshMasterDetailNavigationContainer();

            masterDetail.AddPage <MainViewModel>("Contacts");
            masterDetail.AddPage <AboutViewModel>("About");
            masterDetail.Init("Menu");

            MainPage = masterDetail;
        }
        public static void InitializeAndShowMasterDetailPage()
        {
            try
            {
                masterDetailNav = new FreshMasterDetailNavigationContainer();

                var drawerMenuPage = FreshPageModelResolver.ResolvePageModel <DrawerMenuPageModel>();
                var homePageModel  = FreshPageModelResolver.ResolvePageModel <HomePageModel>();
                var navContainer   = new NavigationPage(homePageModel)
                {
                    BarBackgroundColor = Color.FromHex("#121212"),
                    BarTextColor       = (Color.White)
                };
                masterDetailNav.Master = drawerMenuPage;
                masterDetailNav.Detail = navContainer;
                switch (Device.RuntimePlatform)
                {
                case Device.iOS:
                    masterDetailNav.IsGestureEnabled = false;
                    break;

                case Device.Android:
                    masterDetailNav.IsGestureEnabled = true;
                    break;

                default:
                    break;
                }
                Application.Current.MainPage = masterDetailNav;
            }
            catch (System.Exception ex)
            {
            }
        }
示例#3
0
        Page LoadMain()
        {
            // init main page using resolver
            var mainMenuPage = FreshPageModelResolver.ResolvePageModel <MainMenuPageModel> ();

            mainMenuPage.Title = "Menu";

            var masterPageArea = new FreshNavigationContainer(mainMenuPage, MainAppMenuContainerName);

            masterPageArea.Title = "Menu";
            masterPageArea.Icon  = "menu.png";

            // this is for the tab bar on the bottom
            var detailPageArea = new FreshTabbedNavigationContainer(MainAppDetailContainerName)
            {
                Title = "Home"
            };

            // data allows us to send an object to the Init() of the pageModel. not needed here, but useful.
            detailPageArea.AddTab <HomePageModel> (title: "Contacts", icon: "contacts.png", data: null);
            detailPageArea.AddTab <QuoteListPageModel> (title: "Quotes", icon: "document.png", data: null);
            detailPageArea.AddTab <ArticleListPageModel>(title: "Articles", icon: "document.png", data: null);
            // this is so we can have the hamburger menu
            var masterDetailPageArea = new FreshMasterDetailNavigationContainer(MainAppMasterDetailContainerName);

            masterDetailPageArea.Master = masterPageArea;
            masterDetailPageArea.Detail = detailPageArea;

            App.mainMasterDetail = masterDetailPageArea;

            return(masterDetailPageArea);
        }
        public App()
        {
            var page = FreshPageModelResolver.ResolvePageModel <ButtonsPageModel> ();
            var basicNavContainer = new FreshMasterDetailNavigationContainer();

            MainPage = basicNavContainer;
        }
示例#5
0
        public static void InitializeAndShowMasterDetailPage()
        {
            masterDetailNav = new FreshMasterDetailNavigationContainer();

            var drawerMenuPage           = FreshPageModelResolver.ResolvePageModel <DrawerMenuPageModel>();
            var userDetails              = FreshPageModelResolver.ResolvePageModel <UserListPageModel>();
            var basicNavigationContainer = new NavigationPage(userDetails)
            {
                //BarBackgroundColor = (Color)Application.Current.Resources["secondaryColor"],
                BarTextColor = (Color.White)
            };

            masterDetailNav.Master = drawerMenuPage;
            masterDetailNav.Detail = basicNavigationContainer;
            switch (Device.RuntimePlatform)
            {
            case Device.iOS:
                masterDetailNav.IsGestureEnabled = false;
                break;

            case Device.Android:
                masterDetailNav.IsGestureEnabled = true;
                break;

            default:
                break;
            }
            Application.Current.MainPage = masterDetailNav;
        }
示例#6
0
 public void LoadMasterDetail()
 {
     var masterDetailNav = new FreshMasterDetailNavigationContainer ();
     masterDetailNav.Init ("Menu");
     masterDetailNav.AddPage<ContactListPageModel> ("Contacts", null);
     masterDetailNav.AddPage<QuoteListPageModel> ("Quotes", null);
     MainPage = masterDetailNav;
 }
示例#7
0
 public async Task LoadMasterDetail ()
 {
     var masterDetailNav = new FreshMasterDetailNavigationContainer ();
     masterDetailNav.Init ("Menu", "Menu.png");
     await masterDetailNav.AddPage<ContactListPageModel> ("Contacts", null);
     await masterDetailNav.AddPage<QuoteListPageModel> ("Quotes", null);
     MainPage = masterDetailNav;
 }
示例#8
0
        private void SetupMasterDetail()
        {
            var masterDetail = new FreshMasterDetailNavigationContainer();

            masterDetail.AddPage <ContactListPageModel>(PageNames.Contacts, null);
            masterDetail.AddPage <QuoteListPageModel>(PageNames.Quotes, null);
            masterDetail.Init(PageNames.Menu);
            this.MainPage = masterDetail;
        }
示例#9
0
        public void LoadMasterDetail()
        {
            var masterDetailNav = new FreshMasterDetailNavigationContainer();

            masterDetailNav.Init("Menu", "Menu.png");
            masterDetailNav.AddPage <ContactListPageModel>("Contacts", null);
            masterDetailNav.AddPage <QuoteListPageModel>("Quotes", null);
            MainPage = masterDetailNav;
        }
示例#10
0
        public void MasterDetailNavigation()
        {
            var masterDetailNav = new FreshMasterDetailNavigationContainer();

            masterDetailNav.Init("Menu", "Menu.png");
            masterDetailNav.AddPage <MainPageModel> ("Home", null);
            masterDetailNav.AddPage <TestPageModel> ("Test page", null);
            MainPage = masterDetailNav;
        }
示例#11
0
        public void SetNavigation()
        {
            var navContainer = new FreshMasterDetailNavigationContainer();

            navContainer.Init("Menu", "hamburger.png");
            navContainer.AddPage <DashBoardPageModel>("Dashboard");
            navContainer.AddPage <CardsPageModel>("My Loyalty Cards");

            MainPage = navContainer;
        }
        public void pagemodel_should_be_link_to_when_created_firsttime()
        {
            //master detail navigation
            var masterDetailNavigation = new FreshMasterDetailNavigationContainer("TestingLinking");

            masterDetailNavigation.AddPage <MockContentPageModel> ("Page1", null);
            masterDetailNavigation.AddPage <MockContentPageModel> ("Page2", null);
            var pageModel1 = masterDetailNavigation.Pages ["Page1"].GetPageFromNav().GetModel();
            var pageModel2 = masterDetailNavigation.Pages ["Page2"].GetPageFromNav().GetModel();

            pageModel1.CurrentNavigationServiceName.Should().Be("TestingLinking");
            pageModel2.CurrentNavigationServiceName.Should().Be("TestingLinking");

            if (FreshIOC.Container.Resolve <IFreshNavigationService> ("TestingLinking") == null)
            {
                throw new Exception("Should contain navigation service");
            }

            //tabbed navigation
            var tabbedNavigation = new FreshTabbedNavigationContainer("TestingLinking2");

            tabbedNavigation.AddTab <MockContentPageModel> ("Page1", null);
            tabbedNavigation.AddTab <MockContentPageModel> ("Page2", null);
            var tabbedPageModel1 = tabbedNavigation.TabbedPages.First().GetModel();
            var tabbedPageModel2 = tabbedNavigation.TabbedPages.Skip(1).Take(1).First().GetModel();

            tabbedPageModel1.CurrentNavigationServiceName.Should().Be("TestingLinking2");
            tabbedPageModel2.CurrentNavigationServiceName.Should().Be("TestingLinking2");

            if (FreshIOC.Container.Resolve <IFreshNavigationService> ("TestingLinking2") == null)
            {
                throw new Exception("Should contain navigation service");
            }

            //standard navigation should set named navigation
            var page      = FreshPageModelResolver.ResolvePageModel <MockContentPageModel>();
            var pageModel = page.BindingContext as MockContentPageModel;

            new FreshNavigationContainer(page, "testingLinking3");
            pageModel.CurrentNavigationServiceName.Should().Be("testingLinking3");

            if (FreshIOC.Container.Resolve <IFreshNavigationService> ("testingLinking3") == null)
            {
                throw new Exception("Should contain navigation service");
            }

            //standard navigation should throw exception when binding context isn't a FreshBasePageModel
            var    pageEx = new Page();
            Action standardNavExeption = () => new FreshNavigationContainer(pageEx, "testingLinking");

            standardNavExeption.ShouldThrow <Exception> ().WithMessage("BindingContext was not a FreshBasePageModel on this Page");
        }
示例#13
0
        public App()
        {
            // The root page of your application
            FreshIOC.Container.Register <IDatabaseService, DatabaseService>();

            var masterDetailNav = new FreshMasterDetailNavigationContainer();

            masterDetailNav.Init("Menu", "Menu.png");
            masterDetailNav.AddPage <ActionListPageModel>("Actions", null);
            masterDetailNav.AddPage <ContactListPageModel>("Contacts", null);
            masterDetailNav.AddPage <QuoteListPageModel>("Quotes", null);
            MainPage = masterDetailNav;
        }
        public App()
        {
            InitializeComponent();
            FreshIOC.Container.Register <IPharmacyService, PharmacyService>();
            var masterDetailNav = new FreshMasterDetailNavigationContainer();

            masterDetailNav.Init("Меню");
            masterDetailNav.AddPage <ProductListPageModel>("Главная страница", null);
            masterDetailNav.SwitchSelectedRootPageModel <ProductListPageModel>();
            masterDetailNav.AddPage <LoginPageModel>("Войти", null);
            masterDetailNav.AddPage <RegisterPageModel>("Регистрация", null);

            MainPage = masterDetailNav;
        }
 public void SwitchOnIdiom()
 {
     if (Device.Idiom == TargetIdiom.Phone) {
         var masterDetailNav = new FreshMasterDetailNavigationContainer ();
         masterDetailNav.Init ("Menu");
         masterDetailNav.AddPage<ContactListPageModel> ("Contacts", null);
         masterDetailNav.AddPage<QuoteListPageModel> ("Quotes", null);
         MainPage = masterDetailNav;
     } else {
         var tabbedNavigation = new FreshTabbedNavigationContainer ();
         tabbedNavigation.AddTab<ContactListPageModel> ("Contacts", "contacts.png", null);
         tabbedNavigation.AddTab<QuoteListPageModel> ("Quotes", "document.png", null);
         MainPage = tabbedNavigation;
     }
 }
示例#16
0
        public App()
        {
            FreshIOC.Container.Register <IDataService, DataService>();
            FreshIOC.Container.Register <IDataManager, DataManager>();

            var masterDetail = new FreshMasterDetailNavigationContainer();
            var detail       = FreshPageModelResolver.ResolvePageModel <AllSessionsPageModel>();

            masterDetail.Detail = new FreshNavigationContainer(detail);
            var master = FreshPageModelResolver.ResolvePageModel <MenuPageModel>();

            master.Title        = "UTOS";
            masterDetail.Master = master;
            MainPage            = masterDetail;
        }
示例#17
0
 public FreshMasterDetailNavigationContainer LoadMasterDetail()
 {
     try
     {
         var masterDetailNav = new FreshMasterDetailNavigationContainer();
         masterDetailNav.Init("Menu", "hamburger.png");
         masterDetailNav.AddPage <EventsPageModel>("Events", null);
         masterDetailNav.AddPage <DonorsPageModel>("Donors", null);
         masterDetailNav.AddPage <CollectionPageModel>("Collection", null);
         return(masterDetailNav);
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         throw;
     }
 }
示例#18
0
        public App()
        {
            // Initialize the message queueing
            DependencyService.Get<IZoneMQ>().Init();

            // The root page of your application
            //MainPage = new RootPage();
            var masterDetailNav = new FreshMasterDetailNavigationContainer();

            masterDetailNav.Init("Menu");
            masterDetailNav.AddPage<SchedulePageModel>("Schedule");
            masterDetailNav.AddPage<ManualPageModel>("Manual");
            masterDetailNav.AddPage<ZonesPageModel>("Zones");
            masterDetailNav.AddPage<SettingsPageModel>("Settings");

            MainPage = masterDetailNav;
        }
 public void SwitchOnIdiom()
 {
     if (Device.Idiom == TargetIdiom.Phone)
     {
         var masterDetailNav = new FreshMasterDetailNavigationContainer();
         masterDetailNav.Init("Menu");
         masterDetailNav.AddPage <ContactListPageModel> ("Contacts", null);
         masterDetailNav.AddPage <QuoteListPageModel> ("Quotes", null);
         MainPage = masterDetailNav;
     }
     else
     {
         var tabbedNavigation = new FreshTabbedNavigationContainer();
         tabbedNavigation.AddTab <ContactListPageModel> ("Contacts", "contacts.png", null);
         tabbedNavigation.AddTab <QuoteListPageModel> ("Quotes", "document.png", null);
         MainPage = tabbedNavigation;
     }
 }
示例#20
0
        public static void LoadMasterDetail()
        {
            masterDetailNav = new FreshMasterDetailNavigationContainer();
            masterDetailNav.Measure(130, 130, MeasureFlags.IncludeMargins);
            // masterDetailNav.Icon = "hamburger.png";
            //masterDetailNav.Title = "eNotes";

            masterDetailNav.Init("iApps Solutions", "hamburger.png");
            masterDetailNav.AddPage <PurchasePageModel>("PurChase Notes", null);
            masterDetailNav.AddPage <ExpensesPageModel>("Expenses Notes", null);
            masterDetailNav.AddPage <SettingsPageModel>("Settings", null);

            var mainpage = FreshPageModelResolver.ResolvePageModel <MenuPageModel>();

            masterDetailNav.Detail = new FreshNavigationContainer(mainpage, "NotesListPageNav");
            //var mainpageq = FreshPageModelResolver.ResolvePageModel<MasterPageModel>();
            // masterDetailNav.Master =  mainpageq;
            App.Current.MainPage = masterDetailNav;
        }
        public Application()
        {
            if (!Current.Properties.TryGetValue("Auth", out object name))
            {
                Xamarin.Forms.Application.Current.Properties["Auth"] = "False";
            }
            InitializeComponent();
            FreshIOC.Container.Register <IPharmacyService, PharmacyService>();
            var masterDetailNav = new FreshMasterDetailNavigationContainer();

            var homePage = FreshPageModelResolver.ResolvePageModel <ProductListPageModel>();

            masterDetailNav.Detail = new FreshNavigationContainer(homePage);
            var homePageModel = homePage.GetModel();

            var menuPage = FreshPageModelResolver.ResolvePageModel <MenuPageModel>(homePageModel);

            masterDetailNav.Master = menuPage;
            MainPage = masterDetailNav;
        }
        public void pagemodel_should_be_link_to_when_created_firsttime()
        {
            //master detail navigation
            var masterDetailNavigation = new FreshMasterDetailNavigationContainer("TestingLinking");
            masterDetailNavigation.AddPage<MockContentPageModel> ("Page1", null);
            masterDetailNavigation.AddPage<MockContentPageModel> ("Page2", null);
            var pageModel1 = masterDetailNavigation.Pages ["Page1"].GetPageFromNav().GetModel ();
            var pageModel2 = masterDetailNavigation.Pages ["Page2"].GetPageFromNav().GetModel();
            pageModel1.CurrentNavigationServiceName.Should ().Be ("TestingLinking");
            pageModel2.CurrentNavigationServiceName.Should ().Be ("TestingLinking");

            if (FreshIOC.Container.Resolve<IFreshNavigationService> ("TestingLinking") == null)
                throw new Exception ("Should contain navigation service");

            //tabbed navigation 
            var tabbedNavigation = new FreshTabbedNavigationContainer("TestingLinking2");
            tabbedNavigation.AddTab<MockContentPageModel> ("Page1", null);
            tabbedNavigation.AddTab<MockContentPageModel> ("Page2", null);
            var tabbedPageModel1 = tabbedNavigation.TabbedPages.First ().GetModel ();
            var tabbedPageModel2 = tabbedNavigation.TabbedPages.Skip (1).Take (1).First ().GetModel ();
            tabbedPageModel1.CurrentNavigationServiceName.Should ().Be ("TestingLinking2");
            tabbedPageModel2.CurrentNavigationServiceName.Should ().Be ("TestingLinking2");

            if (FreshIOC.Container.Resolve<IFreshNavigationService> ("TestingLinking2") == null)
                throw new Exception ("Should contain navigation service");
            
            //standard navigation should set named navigation
            var page = FreshPageModelResolver.ResolvePageModel<MockContentPageModel>();
            var pageModel = page.BindingContext as MockContentPageModel;
            var standardNavigation = new FreshNavigationContainer(page, "testingLinking3");
            pageModel.CurrentNavigationServiceName.Should ().Be ("testingLinking3");

            if (FreshIOC.Container.Resolve<IFreshNavigationService> ("testingLinking3") == null)
                throw new Exception ("Should contain navigation service");
            
            //standard navigation should throw exception when binding context isn't a FreshBasePageModel
            var pageEx = new Page();
            Action standardNavExeption = () => new FreshNavigationContainer(pageEx, "testingLinking");
            standardNavExeption.ShouldThrow<Exception> ().WithMessage ("BindingContext was not a FreshBasePageModel on this Page");
        }
示例#23
0
        public void SwitchNavigation(NavigationStacks navigationStacks, FreshBasePageModel page)
        {
            switch (navigationStacks)
            {
            case (NavigationStacks.Authentication):
                var loginPage = FreshPageModelResolver.ResolvePageModel <LoginViewModel>();
                var authenticationNavContainer = new FreshNavigationContainer(loginPage, navigationStacks.ToString());
                page.CoreMethods.SwitchOutRootNavigation(navigationStacks.ToString());
                break;

            case (NavigationStacks.Main):
                var mainPage         = FreshPageModelResolver.ResolvePageModel <MainViewModel>();
                var mainNavContainer = new FreshNavigationContainer(mainPage, navigationStacks.ToString());
                page.CoreMethods.SwitchOutRootNavigation(navigationStacks.ToString());
                break;

            case (NavigationStacks.MasterDetail):
                var mainMasterDetailContainer = new FreshMasterDetailNavigationContainer(navigationStacks.ToString());
                mainMasterDetailContainer.AddPage <MainViewModel>("Contacts");
                mainMasterDetailContainer.AddPage <AboutViewModel>("About");
                mainMasterDetailContainer.AddPage <LogoutViewModel>("Logout");
                mainMasterDetailContainer.Init("Menu");
                page.CoreMethods.SwitchOutRootNavigation(navigationStacks.ToString());
                break;

            case (NavigationStacks.Tabbed):
                var tabbedContainer = new FreshTabbedNavigationContainer(navigationStacks.ToString());
                tabbedContainer.AddTab <MainViewModel>("Contacts", null);
                tabbedContainer.AddTab <AboutViewModel>("About", null);
                page.CoreMethods.SwitchOutRootNavigation(navigationStacks.ToString());
                break;

            case (NavigationStacks.TabbedFO):
                var tabbedFOContainer = new FreshTabbedFONavigationContainer(navigationStacks.ToString());
                tabbedFOContainer.AddTab <MainViewModel>("Contacts", null);
                tabbedFOContainer.AddTab <AboutViewModel>("About", null);
                page.CoreMethods.SwitchOutRootNavigation(navigationStacks.ToString());
                break;
            }
        }
示例#24
0
        public bool Login(string username, string password)
        {
            if (string.IsNullOrEmpty(username) || string.IsNullOrEmpty(password))
            {
                CoreMethods.DisplayAlert("Invalid User", "Please provide the right username and password", "OK");
                return(false);
            }
            else
            {
                CoreMethods.DisplayAlert("Login Success", "Welcome", "OK");


                var masterDetailNav = new FreshMasterDetailNavigationContainer();
                masterDetailNav.Init("Dashboard");
                masterDetailNav.AddPage <PlayerListPageModel>("Check-in/out Players", null);
                masterDetailNav.AddPage <QueueListPageModel>("Queues", null);
                masterDetailNav.AddPage <CourtListPageModel>("Courts", null);
                masterDetailNav.AddPage <UserListPageModel>("Admin Users", null);
                masterDetailNav.AddPage <HelpPageModel>("Help", null);
                Application.Current.MainPage = masterDetailNav;
                return(true);
            }
        }
示例#25
0
        public void LoadMasterDetail()
        {
            var masterDetailNav = new FreshMasterDetailNavigationContainer();

            masterDetailNav.Init("Unit Convertor");
            masterDetailNav.AddPage <LengthPageModel>("Length");
            masterDetailNav.AddPage <ForcePageModel>("Force");
            masterDetailNav.AddPage <MomentPageModel>("Moment");
            masterDetailNav.AddPage <StressPageModel>("Stress");
            masterDetailNav.AddPage <AccelerationPageModel>("Acceleration");
            masterDetailNav.AddPage <AnglePageModel>("Angle");
            masterDetailNav.AddPage <AreaPageModel>("Area");
            masterDetailNav.AddPage <ForcePerLengthPageModel>("Force Per Length");
            masterDetailNav.AddPage <ForcePerVolumePageModel>("Force Per Volume");
            masterDetailNav.AddPage <InertiaPageModel>("Inertia");
            Page master = FreshPageModelResolver.ResolvePageModel <MenuPageModel>();
            Page detail = FreshPageModelResolver.ResolvePageModel <LengthPageModel>();

            master.Title           = "Unit Convertor";
            masterDetailNav.Master = master;
            //masterDetailNav.Detail = detail;
            Application.Current.MainPage = masterDetailNav;
        }
 public Task PushNewNavigationServiceModal(FreshMasterDetailNavigationContainer masterDetailContainer)
 {
     throw new NotImplementedException();
 }
 public Task PushNewNavigationServiceModal(FreshMasterDetailNavigationContainer masterDetailContainer, FreshBasePageModel basePageModel = null)
 {
     throw new NotImplementedException();
 }
示例#28
0
        void Handle_OnSuccessfulLogin(object sender, bool e)
        {
            LoggedIn = true;
            void action()
            {
                MasterDetailNav = new FreshMasterDetailNavigationContainer();
                MasterDetailNav.Init("");
                var page = FreshPageModelResolver.ResolvePageModel <MasterMenuPageModel>();

                ((MasterMenuPageModel)page.BindingContext).OnLogout += (_sender, _e) =>
                {
                    var __page = FreshPageModelResolver.ResolvePageModel <LoginPageModel>(true);
                    MainPage              = __page;
                    MasterDetailNav       = null;
                    MasterDetailContainer = null;
                    UserName              = null;
                    ((LoginPageModel)__page.BindingContext).OnSuccessfulLogin += Handle_OnSuccessfulLogin;
                    try
                    {
                        OnLoggedOut?.Invoke(this, true);
                    }
                    catch (Exception ex)
                    {
                        Crashes.TrackError(ex);
                    }
                };
                page.Title                     = "Menu";
                MasterDetailNav.Master         = page;
                MasterDetailNav.MasterBehavior = MasterBehavior.Popover;
                MasterDetailNav.AddPage <WelcomePageModel>("Home", null);
                CurrentPageModel = MasterDetailNav.Pages.Values.First().BindingContext as BaseDetailPage;
                MasterDetailNav.AddPage <MaintenanceTicketsPageModel>("Maintenance Tickets", null);
                this.MainPage         = MasterDetailNav;
                MasterDetailContainer = MasterDetailNav;
                MasterDetailNav.IsPresentedChanged += (_sender, _e) =>
                {
                    if (_sender is FreshMasterDetailNavigationContainer)
                    {
                        foreach (var _page in ((FreshMasterDetailNavigationContainer)_sender).Pages.Values)
                        {
                            var nav = _page as NavigationPage;
                            if (nav.CurrentPage is null || nav.CurrentPage.BindingContext is null)
                            {
                                return;
                            }
                            if (nav.CurrentPage.BindingContext is BaseDetailPage currentPageModel)
                            {
                                if (!currentPageModel.IsModal)
                                {
                                    currentPageModel.HamburgerIsVisible = !MasterDetailNav.IsPresented;
                                }
                                else
                                {
                                    currentPageModel.HamburgerIsVisible = false;
                                }
                                CurrentPageModel = currentPageModel;
                            }
                        }
                    }
                };
            }

            Xamarin.Forms.Device.BeginInvokeOnMainThread(action);
        }