Пример #1
0
        private IEnumerable<NavigationButtonInfoMeta> getPrimaryButtons(ViewModelBaseExt viewModel)
        {
            //if (string.IsNullOrEmpty(PrimaryNavigationEntryPath))
            //{
            //    //need to break it down

            //adding them twice and setting page shouldnt change primary buttons (extra gets dropped, just pass empty - no, smoehting? and handle)
            //null for no change, 0 for 0
            //windows UAP cache
            //}
            if (viewModel is ShellViewModelExt)
                return null;

            if (viewModel is SettingsPageViewModelExt)
                return null;

            IEnumerable<NavigationButtonInfoMeta> buttons = new NavigationButtonInfoMeta[]
            {
                new NavigationButtonInfoMeta()
                {
                    PageType =  Type.GetType("Minimal.Views.HomePage"),
                    PageParameter = "Source=Shell",
                    Text = "Home",
                    Symbol = Symbol.Home
                },
                new NavigationButtonInfoMeta()
                {
                    PageType =  Type.GetType("Minimal.Views.MasterPage"),
                    PageParameter = "Source=Shell",
                    Text = "Master",
                    Symbol = Symbol.ImportAll
                }
            };
            if (viewModel is DetailPageViewModelExt)
                buttons = buttons.Union(new NavigationButtonInfoMeta[] {
                    new NavigationButtonInfoMeta()
                    {
                        PageType = Type.GetType("Minimal.Views.DetailPage"),
                        PageParameter = "Source=Shell",
                        Text = "Detail Page",
                        Symbol = Symbol.AddFriend
                    } });
            return buttons;
        }
Пример #2
0
 private NavigationButtonInfo createNavigationButtonInfo(NavigationButtonInfoMeta m)
 {
     return createNavigationButtonInfo(m.PageType, m.Text, m.Symbol, m.PageParameter);
 }