Пример #1
0
        public Task PushNewNavigationServiceModal(FreshMasterDetailNavigationContainer masterDetailContainer)
        {
            var models = masterDetailContainer.Pages.Select(o =>
            {
                if (o.Value is NavigationPage)
                {
                    return(((NavigationPage)o.Value).CurrentPage.GetModel());
                }
                else
                {
                    return(o.Value.GetModel());
                }
            });

            return(PushNewNavigationServiceModal(masterDetailContainer, models.ToArray()));
        }
Пример #2
0
        public Task PushNewNavigationServiceModal(FreshMasterDetailNavigationContainer masterDetailContainer, FreshBasePageModel basePageModel = null)
        {
            var models = masterDetailContainer.Pages.Select(o =>
            {
                if (o.Value is NavigationPage)
                {
                    return(((NavigationPage)o.Value).CurrentPage.GetModel());
                }
                else
                {
                    return(o.Value.GetModel());
                }
            }).ToList();

            if (basePageModel != null)
            {
                models.Add(basePageModel);
            }

            return(PushNewNavigationServiceModal(masterDetailContainer, models.ToArray()));
        }
Пример #3
0
        public FreshMvvm.FreshMasterDetailNavigationContainer SetUpMasterDetailNavigation()
        {
            var nav = new FreshMvvm.FreshMasterDetailNavigationContainer();

            // = Color.AliceBlue;

            nav.Init("Menu");
            nav.AddPage <Pages.ExplorePageModel>("Explore");
            nav.AddPage <Pages.HomePageModel>("Home");
            nav.AddPage <Pages.CreateAdPageModel>("Create Ad");
            nav.AddPage <Pages.CreateEventPageModel>("Create Event");
            nav.AddPage <Pages.SettingsPageModel>("Settings");
            nav.AddPage <Pages.HelpPageModel>("Help");
            nav.AddPage <Pages.UserProfilePageModel>("Profile");
            (nav.Master as Page).BackgroundColor = Color.FromHex("fbe9e7");

            foreach (NavigationPage npg in nav.Pages.Values)
            {
                npg.BarBackgroundColor = Color.FromHex("c8b7b5");
            }
            return(nav);
        }