コード例 #1
0
        public void GoToMasterDetails()
        {
            var masterDetailNav = new CustomMasterDetailNavigationContainer();

            masterDetailNav.Init("Menu", "hamburger.png");
            masterDetailNav.AddPage <NewsViewModel>("News", null);
            masterDetailNav.AddPage <ContactsViewModel>("Contacts", null);
            MainPage = masterDetailNav;
        }
コード例 #2
0
        public void LoadCustomMasterDetail()
        {
            var masterDetailNav = new CustomMasterDetailNavigationContainer();

            masterDetailNav.Init("Меню");
            masterDetailNav.AddPage <MainPageModel>("Главная", "Главное меню", '\uf015'.ToString(), Color.Blue);
            masterDetailNav.AddPage <LoginPageModel>("Вход", "Главное меню", '\uf090'.ToString());
            masterDetailNav.AddPage <SettingsPageModel>("Настройки", "Настройки", '\uf1de'.ToString());
            masterDetailNav.AddPage <AuthorPageModel>("Автор", "Настройки", '\uf059'.ToString());
            MainPage = masterDetailNav;
        }
コード例 #3
0
        private void SetupNavigation()
        {
            var mainNavigation = new CustomMasterDetailNavigationContainer(NavigationContainerNames.MainContainer);

            mainNavigation.Init("Menu", "hamburger.png");
            mainNavigation.AddPage <MainPageModel>("Dashboard");
            mainNavigation.AddPage <ActivityPageModel>("Activity");
            mainNavigation.AddPage <HistoryPageModel>("History");
            mainNavigation.AddPage <SettingsPageModel>("Settings");

            var loginPage      = FreshPageModelResolver.ResolvePageModel <LoginPageModel>();
            var loginContainer = new FreshNavigationContainer(loginPage, NavigationContainerNames.AuthenticationContainer);

            if (string.IsNullOrWhiteSpace(Settings.ApiToken))
            {
                MainPage = loginContainer;
            }
            else
            {
                MainPage = mainNavigation;
            }
        }