void InitializeMainPage()
        {
            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();
            }
        }
        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();
            }
        }
Пример #3
0
 void InitializeMainPage()
 {
     if (Device.RuntimePlatform == Device.UWP)
     {
         MainPage = new MainPage();
     }
     else
     {
         MainPage = new ShellPage();
     }
 }
Пример #4
0
        // This code is called from the App Constructor so just initialize the main page of the application here
        void InitializeMainPage()
        {
            this.Resources.Add(StyleSheet.FromAssemblyResource(
                                   IntrospectionExtensions.GetTypeInfo(typeof(App)).Assembly,
                                   "Xamarin.Forms.Sandbox.Styles.css"));

            //MainPage = CreateStackLayoutPage(new[] { new Button() {  Text = "text" } });
            //MainPage.Visual = VisualMarker.Material;
            MainPage = new ShellPage();

            //	MainPage = new NavigationPage(new MainPage());
        }
Пример #5
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();
            }
        }
Пример #6
0
 void InitializeMainPage()
 {
     MainPage = new ShellPage();
 }