private void SetPage(RootMasterDetailPageMenuItem item)
        {
            if (item == null)
            {
                return;
            }

            var page = (Page)Activator.CreateInstance(item.TargetType);

            page.Title = item.Title;

            //Detail = new DoodsNavigationPage(page);
            Detail      = page;
            IsPresented = false;

            MasterPage.ListView.SelectedItem = null;
        }
Exemplo n.º 2
0
        public RootMasterDetailPageMasterViewModel(ILogger logger) : base(logger)
        {
            var i = 0;

            MenuItems = new ObservableRangeCollection <RootMasterDetailPageMenuItem>(new[]
            {
                new RootMasterDetailPageMenuItem {
                    Id = i++, Title = "Home", TargetType = typeof(HomeTabbedPage.HomeTabbedPage)
                },
                new RootMasterDetailPageMenuItem {
                    Id = i++, Title = "Commands", TargetType = typeof(CommandPage.CommandListViewPage)
                },
                new RootMasterDetailPageMenuItem {
                    Id = i++, Title = "Settings", TargetType = typeof(SettingsPage.SettingsPage)
                }
            });

            Item = MenuItems.First();
        }