Beispiel #1
0
        public App()
        {
            InitializeComponent();

            if (Device.RuntimePlatform == Device.iOS)
            {
                var tabs = new FreshTabbedNavigationContainer("RunkeeperTabs");

                tabs.AddTab <MePageModel>("Me", "me.png");
                tabs.AddTab <MyPlanPageModel>("My Plan", "myplan.png");
                tabs.AddTab <StartPageModel>("Start", "start.png");
                tabs.AddTab <FriendsPageModel>("Friends", "friends.png");
                tabs.AddTab <ChallengesPageModel>("Challenges", "challenges.png");

                // Set the selected tab to the middle one.
                tabs.SwitchSelectedRootPageModel <StartPageModel>();

                MainPage = tabs;
            }
            else
            {
                var navContainer = new CustomNavigation();

                navContainer.Init("Menu", "hamburger.png");
                navContainer.AddPage <StartPageModel>("Start");
                navContainer.AddPage <MePageModel>("Me");
                navContainer.AddPage <MeClonePageModel>("MeClone");

                MainPage = navContainer;
            }
        }
Beispiel #2
0
        public App()
        {
            InitializeComponent();

            //MainPage = new FreshNavigationContainer(FreshPageModelResolver.ResolvePageModel<SettingPageModel>());
            var bottomBarPage = new CustomNavigation()
            {
                BackgroundColor = Color.FromRgb(1, 146, 135),
            };

            bottomBarPage.AddTab <MainPageModel>("", "earthqauke.png");
            bottomBarPage.AddTab <MessagePageModel>("", "earthqauke.png");
            bottomBarPage.AddTab <InformationPageModel>("", "information.png");

            MainPage = bottomBarPage;
        }
Beispiel #3
0
        public App()
        {
            InitializeComponent();

            if (Device.RuntimePlatform == Device.iOS)
            {
                var tabs = new FreshMvvm.FreshTabbedNavigationContainer()
                {
                    BarTextColor       = Color.Black,
                    BarBackgroundColor = Color.FromHex("#019287")
                };

                tabs.BarTextColor = Color.FromHex("#019287");

                tabs.AddTab <InformationPageModel>("Anasayfa", "icon_home.png");
                tabs.AddTab <MainPageModel>("Depremler", "icon_earthquake.png");
                tabs.AddTab <SettingPageModel>("Güvendeyim", "icon_safe.png");
                tabs.AddTab <SettingPageModel>("Ayarlar", "icon_settings.png");
                tabs.AddTab <InformationPageModel>("Hakkında", "icon_information.png");

                MainPage = tabs;
            }
            else
            {
                var bottomBarPage = new CustomNavigation()
                {
                    BarTextColor = Color.Black, BarBackgroundColor = Color.FromHex("#019287")
                };

                bottomBarPage.FixedMode    = true;
                bottomBarPage.BarTheme     = BottomBarPage.BarThemeTypes.Light;
                bottomBarPage.BarTextColor = Color.FromHex("#019287");

                bottomBarPage.AddTab <InformationPageModel>("Anasayfa", "icon_home.png");
                bottomBarPage.AddTab <MainPageModel>("Depremler", "icon_earthquake.png");
                bottomBarPage.AddTab <SettingPageModel>("Güvendeyim", "icon_safe.png");
                bottomBarPage.AddTab <SettingPageModel>("Ayarlar", "icon_settings.png");
                bottomBarPage.AddTab <InformationPageModel>("Hakkında", "icon_information.png");

                MainPage = bottomBarPage;
            }
        }
        protected virtual async Task InternalNavigateToAsync(Type viewModelType, object parameter)
        {
            var page = CreateAndBindPage(viewModelType, parameter);

            if (page is SplashView || page is LoginView)
            {
                CurrentApplication.MainPage = new CustomNavigation(page);
            }
            else if (page is MainView)
            {
                CurrentApplication.MainPage = page;
            }
            else if (CurrentApplication.MainPage is MainView mainPage)
            {
                if (mainPage.Detail is CustomNavigation navigationPage)
                {
                    await navigationPage.PushAsync(page);
                }
                else
                {
                    navigationPage  = new CustomNavigation(page);
                    mainPage.Detail = navigationPage;
                }

                mainPage.IsPresented = false;
            }
            else
            {
                if (CurrentApplication.MainPage is CustomNavigation navigationPage)
                {
                    await navigationPage.PushAsync(page);
                }
                else
                {
                    CurrentApplication.MainPage = new CustomNavigation(page);
                }
            }

            await((BaseViewModel)page.BindingContext).InitializeAsync(parameter);
        }
Beispiel #5
0
        public App()
        {
            InitializeComponent();

            if (Device.RuntimePlatform == Device.iOS)
            {
                var tabs = new FreshMvvm.FreshTabbedNavigationContainer()
                {
                    BarTextColor = Color.White, BarBackgroundColor = Color.Black
                };

                tabs.AddTab <MainPageModel>("Home", "icon_home.png");
                tabs.AddTab <EmptyPageModel>("Browse", "icon_browse.png");
                tabs.AddTab <EmptyPageModel>("Search", "icon_search.png");
                tabs.AddTab <EmptyPageModel>("Radio", "icon_radio.png");
                tabs.AddTab <EmptyPageModel>("Your Library", "icon_library.png");

                MainPage = tabs;
            }
            else
            {
                var bottomBarPage = new CustomNavigation()
                {
                    BarTextColor = Color.White, BarBackgroundColor = Color.Black
                };

                bottomBarPage.FixedMode    = true;
                bottomBarPage.BarTheme     = BottomBarPage.BarThemeTypes.DarkWithoutAlpha;
                bottomBarPage.BarTextColor = Color.White;

                bottomBarPage.AddTab <MainPageModel>("Home", "icon_home.png");
                bottomBarPage.AddTab <EmptyPageModel>("Browse", "icon_browse.png");
                bottomBarPage.AddTab <EmptyPageModel>("Search", "icon_search.png");
                bottomBarPage.AddTab <EmptyPageModel>("Radio", "icon_radio.png");
                bottomBarPage.AddTab <EmptyPageModel>("Your Library", "icon_library.png");

                MainPage = bottomBarPage;
            }
        }
Beispiel #6
0
        public App()
        {
            InitializeComponent();

            MainPage = new CustomNavigation();
        }
Beispiel #7
0
 public App()
 {
     // The root page of your application
     MainPage = new CustomNavigation();
 }