void InitializeMainPage()
        {
            Routing.RegisterRoute(nameof(SandboxNavigationPage), typeof(SandboxNavigationPage));
            Routing.RegisterRoute(nameof(ModalNavigationPage), typeof(ModalNavigationPage));
            Routing.RegisterRoute(nameof(MainPage), typeof(MainPage));

            bool useTabPage        = false;
            bool useMDP            = false;
            bool useMainPage       = false;
            bool useNavigationPage = false;

            if (useNavigationPage)
            {
                MainPage = new NavigationPage(new MainPage());
            }
            else if (useMainPage)
            {
                MainPage = new MainPage();
            }
            else if (useMDP)
            {
                MainPage = new MDP();
            }
            else if (useTabPage)
            {
                MainPage = new TabPage();
            }
            else
            {
                MainPage = new ShellPage();
            }
        }
Esempio n. 2
0
        void InitializeMainPage()
        {
            Routing.RegisterRoute(nameof(SandboxNavigationPage), typeof(SandboxNavigationPage));
            Routing.RegisterRoute(nameof(ModalNavigationPage), typeof(ModalNavigationPage));
            Routing.RegisterRoute(nameof(MainPage), typeof(MainPage));

            bool useTabPage        = false;
            bool useMDP            = false;
            bool useFlyoutPage     = false;
            bool useMainPage       = false;
            bool useNavigationPage = false;

            if (useNavigationPage)
            {
                MainPage = new NavigationPage(new MainPage());
            }
            else if (useMainPage)
            {
                MainPage = new MainPage();
            }
            else if (useFlyoutPage)
            {
                MainPage = new FlyoutPage();
            }
            else if (useMDP)
#pragma warning disable CS0612 // Type or member is obsolete
            {
                MainPage = new MDP();
            }
#pragma warning restore CS0612 // Type or member is obsolete
            else if (useTabPage)
            {
                MainPage = new TabPage();
            }
            else
            {
                MainPage = new ShellPage();
            }
        }