Exemplo n.º 1
0
        private AppMenuButton CreateAboutButton()
        {
            var btn = new AppMenuButton
            {
                Content   = GenerateButtonContent(Symbol.Help, "About"),
                IsGrouped = true,
                Page      = typeof(AboutPage),
                ToolTip   = "View the app info and links"
            };

            return(btn);
        }
Exemplo n.º 2
0
        private AppMenuButton CreateContributionsButton()
        {
            var btn = new AppMenuButton
            {
                Content   = GenerateButtonContent(Symbol.Library, "Contributions"),
                IsGrouped = true,
                Page      = typeof(ContributionsPage),
                ToolTip   = "View my current community activity contributions"
            };

            return(btn);
        }
Exemplo n.º 3
0
        private static AppMenuButton CreateHomeButton()
        {
            var btn = new AppMenuButton
            {
                ClearNavigationStack = true,
                Content   = GenerateButtonContent(Symbol.Contact, "Profile"),
                IsGrouped = true,
                Page      = typeof(MainPage),
                ToolTip   = "View my profile"
            };

            return(btn);
        }
Exemplo n.º 4
0
        private AppMenuButton CreateRefreshButton()
        {
            var btn = new AppMenuButton
            {
                ButtonType = AppMenuButtonType.Command,
                Command    = new RelayCommand(this.RefreshData),
                Content    = GenerateButtonContent(Symbol.Refresh, "Refresh"),
                IsGrouped  = false,
                ToolTip    = "Refresh data"
            };

            return(btn);
        }
Exemplo n.º 5
0
        private static AppMenuButton CreateHomeButton()
        {
            var homeButton = new AppMenuButton
            {
                ClearNavigationStack = true,
                Page      = typeof(MainPage),
                Content   = GenerateButtonContentWithSymbol(Symbol.Home, "Home"),
                ToolTip   = "Navigate to home",
                IsGrouped = true
            };

            return(homeButton);
        }
Exemplo n.º 6
0
        private IEnumerable <AppMenuButton> CreateSampleCollectionButtons()
        {
            var sampleButtons = new List <AppMenuButton>();

            if (this.sampleService.SampleCollections != null)
            {
                foreach (var collection in this.sampleService.SampleCollections)
                {
                    if (string.IsNullOrWhiteSpace(collection.SourcePageType))
                    {
                        continue;
                    }

                    AppMenuButton sampleButton;

                    try
                    {
                        sampleButton = new AppMenuButton
                        {
                            Page          = Type.GetType(collection.SourcePageType),
                            IsGrouped     = true,
                            PageParameter = collection
                        };

                        if (!string.IsNullOrWhiteSpace(collection.IconPathData))
                        {
                            sampleButton.Content = GenerateButtonContentWithPath(
                                collection.IconPathData,
                                collection.Name);
                        }
                        else
                        {
                            sampleButton.Content = GenerateButtonContentWithSymbol(
                                collection.IconSymbol,
                                collection.Name);
                        }
                    }
                    catch (Exception)
                    {
                        continue;
                    }

                    sampleButtons.Add(sampleButton);
                }
            }

            return(sampleButtons);
        }