Ejemplo n.º 1
0
        public RootPageWindows()
        {
            //MasterBehavior = MasterBehavior.Popover;
            pages = new Dictionary <AppPage, Page>();

            var items = new ObservableCollection <MenuItem>();


            items.Add(new MenuItem {
                Name = $"{EventInfo.EventName}", Icon = "menu_feed.png", Page = AppPage.Feed
            });
            items.Add(new MenuItem {
                Name = "Sessions", Icon = "menu_sessions.png", Page = AppPage.Sessions
            });
            items.Add(new MenuItem {
                Name = "Speakers", Icon = "menu_speakers.png", Page = AppPage.Speakers
            });

            items.Add(new MenuItem {
                Name = "Events", Icon = "menu_events.png", Page = AppPage.Events
            });
            if (FeatureFlags.SponsorsOnTabPage)
            {
                items.Add(new MenuItem {
                    Name = "Sponsors", Icon = "menu_sponsors.png", Page = AppPage.Sponsors
                });
            }

            items.Add(new MenuItem {
                Name = "About", Icon = "menu_info.png", Page = AppPage.Settings
            });

            menu = new MenuPageUWP();
            menu.MenuList.ItemsSource = items;

            menu.MenuList.ItemSelected += (sender, args) =>
            {
                if (menu.MenuList.SelectedItem == null)
                {
                    return;
                }

                Device.BeginInvokeOnMainThread(() =>
                {
                    NavigateAsync(((MenuItem)menu.MenuList.SelectedItem).Page);
                    if (!IsDesktop)
                    {
                        IsPresented = false;
                    }
                });
            };

            Master = menu;
            NavigateAsync((int)AppPage.Feed);
            Title = "DotNetRu App";
        }
Ejemplo n.º 2
0
        public RootPageWindows(IDevice device)
        {
            this.device = device;
            //MasterBehavior = MasterBehavior.Popover;
            pages = new Dictionary<AppPage, Page>();

            var items = new ObservableCollection<MenuItem>
            {
                new MenuItem { Name = "Evolve Feed", Icon = "menu_feed.png", Page = AppPage.Feed },
                new MenuItem { Name = "Sessions", Icon = "menu_sessions.png", Page = AppPage.Sessions },
                new MenuItem { Name = "Events", Icon = "menu_events.png", Page = AppPage.Events },
                new MenuItem { Name = "Mini-Hacks", Icon = "menu_hacks.png", Page = AppPage.MiniHacks },
                new MenuItem { Name = "Sponsors", Icon = "menu_sponsors.png", Page = AppPage.Sponsors },
                new MenuItem { Name = "Evaluations", Icon = "menu_evals.png", Page = AppPage.Evals },
                new MenuItem { Name = "Venue", Icon = "menu_venue.png", Page = AppPage.Venue },
                new MenuItem { Name = "Floor Maps", Icon = "menu_plan.png", Page = AppPage.FloorMap },
                new MenuItem { Name = "Conference Info", Icon = "menu_info.png", Page = AppPage.ConferenceInfo },
                new MenuItem { Name = "Settings", Icon = "menu_settings.png", Page = AppPage.Settings }
            };

            menu = new MenuPageUWP();
            menu.MenuList.ItemsSource = items;

            menu.MenuList.ItemSelected +=  (sender, args) =>
            {
                if (menu.MenuList.SelectedItem == null)
                    return;

                Device.BeginInvokeOnMainThread( () =>
                {
                    NavigateAsync(((MenuItem)menu.MenuList.SelectedItem).Page);
                    if (!IsDesktop)
                        IsPresented = false;
                });
            };

            Master = menu;
            NavigateAsync((int)AppPage.Feed);
            Title ="Xamarin Evolve";
        }
Ejemplo n.º 3
0
        public RootPageWindows()
        {
            //MasterBehavior = MasterBehavior.Popover;
            pages = new Dictionary <AppPage, Page>();

            var items = new ObservableCollection <MenuItem>
            {
                new MenuItem {
                    Name = "Evolve Feed", Icon = "menu_feed.png", Page = AppPage.Feed
                },
                new MenuItem {
                    Name = "Sessions", Icon = "menu_sessions.png", Page = AppPage.Sessions
                },
                new MenuItem {
                    Name = "Events", Icon = "menu_events.png", Page = AppPage.Events
                },
                new MenuItem {
                    Name = "Mini-Hacks", Icon = "menu_hacks.png", Page = AppPage.MiniHacks
                },
                new MenuItem {
                    Name = "Sponsors", Icon = "menu_sponsors.png", Page = AppPage.Sponsors
                },
                new MenuItem {
                    Name = "Evaluations", Icon = "menu_evals.png", Page = AppPage.Evals
                },
                new MenuItem {
                    Name = "Venue", Icon = "menu_venue.png", Page = AppPage.Venue
                },
                new MenuItem {
                    Name = "Floor Maps", Icon = "menu_plan.png", Page = AppPage.FloorMap
                },
                new MenuItem {
                    Name = "Conference Info", Icon = "menu_info.png", Page = AppPage.ConferenceInfo
                },
                new MenuItem {
                    Name = "Settings", Icon = "menu_settings.png", Page = AppPage.Settings
                }
            };

            menu = new MenuPageUWP();
            menu.MenuList.ItemsSource = items;


            menu.MenuList.ItemSelected += (sender, args) =>
            {
                if (menu.MenuList.SelectedItem == null)
                {
                    return;
                }

                Device.BeginInvokeOnMainThread(() =>
                {
                    NavigateAsync(((MenuItem)menu.MenuList.SelectedItem).Page);
                    if (!IsDesktop)
                    {
                        IsPresented = false;
                    }
                });
            };

            Master = menu;
            NavigateAsync((int)AppPage.Feed);
            Title = "Xamarin Evolve";
        }
Ejemplo n.º 4
0
        public RootPageWindows()
        {
            //MasterBehavior = MasterBehavior.Popover;
            pages = new Dictionary <AppPage, Page>();

            var items = new ObservableCollection <MenuItem>();


            items.Add(new MenuItem {
                Name = $"{EventInfo.EventName}", Icon = "menu_feed.png", Page = AppPage.Feed
            });
            items.Add(new MenuItem {
                Name = "Sessions", Icon = "menu_sessions.png", Page = AppPage.Sessions
            });
            if (FeatureFlags.SpeakersEnabled)
            {
                items.Add(new MenuItem {
                    Name = "Speakers", Icon = "menu_speakers.png", Page = AppPage.Speakers
                });
            }
            if (FeatureFlags.EventsEnabled)
            {
                items.Add(new MenuItem {
                    Name = "Events", Icon = "menu_events.png", Page = AppPage.Events
                });
            }
            if (FeatureFlags.MiniHacksEnabled)
            {
                items.Add(new MenuItem {
                    Name = "Mini-Hacks", Icon = "menu_hacks.png", Page = AppPage.MiniHacks
                });
            }
            if (FeatureFlags.SponsorsOnTabPage)
            {
                items.Add(new MenuItem {
                    Name = "Sponsors", Icon = "menu_sponsors.png", Page = AppPage.Sponsors
                });
            }
            if (FeatureFlags.EvalEnabled)
            {
                items.Add(new MenuItem {
                    Name = "Evaluations", Icon = "menu_evals.png", Page = AppPage.Evals
                });
            }

            items.Add(new MenuItem {
                Name = "Venue", Icon = "menu_venue.png", Page = AppPage.Venue
            });
            if (FeatureFlags.FloormapEnabled)
            {
                items.Add(new MenuItem {
                    Name = "Floor Maps", Icon = "menu_plan.png", Page = AppPage.FloorMap
                });
            }
            if (FeatureFlags.ConferenceInformationEnabled)
            {
                items.Add(new MenuItem {
                    Name = "Conference Info", Icon = "menu_info.png", Page = AppPage.ConferenceInfo
                });
            }
            items.Add(new MenuItem {
                Name = "Settings", Icon = "menu_settings.png", Page = AppPage.Settings
            });


            menu = new MenuPageUWP();
            menu.MenuList.ItemsSource = items;


            menu.MenuList.ItemSelected += (sender, args) =>
            {
                if (menu.MenuList.SelectedItem == null)
                {
                    return;
                }

                Device.BeginInvokeOnMainThread(() =>
                {
                    NavigateAsync(((MenuItem)menu.MenuList.SelectedItem).Page);
                    if (!IsDesktop)
                    {
                        IsPresented = false;
                    }
                });
            };

            Master = menu;
            NavigateAsync((int)AppPage.Feed);
            Title = "TechDays 2016";
        }