Exemple #1
0
        private void PopulateApplicationBar()
        {
            // Favorite modules page
            var favoriteModulesPage = new ApplicationBarPage(ApplicationBarMode.Default);
            favoriteModulesPage.AddIconButton("settings...",
                                              new Uri("/Resources/Images/Settings-02.png", UriKind.Relative), this.ViewModel.AdvancedSettingsFavorites);
            this.applicationBarController.AddPage("favorite", favoriteModulesPage);

            // All Modules page
            var allModuesPage = new ApplicationBarPage(ApplicationBarMode.Default);
            allModuesPage.AddIconButton("edit favorites", new Uri("/Resources/Images/Heart.png", UriKind.Relative),
                                        () => this.SetEditFavoriteModules(!this.isEditingFavoriteModules));
            allModuesPage.AddIconButton("get more", new Uri("/Resources/Images/Shopping Bag.png", UriKind.Relative), () => { });
            this.applicationBarController.AddPage("all modules", allModuesPage);

            // Options page
            var optionsPage = new ApplicationBarPage(ApplicationBarMode.Default);
            optionsPage.AddIconButton("about", new Uri("/Resources/Images/About.png", UriKind.Relative),
                                      this.ShowAboutPrompt);
            this.applicationBarController.AddPage("options", optionsPage);
        }
 public bool AddPage(string name, ApplicationBarPage page)
 {
     return this.pages.Add(name, page);
 }