コード例 #1
0
        public NavigationService(
            NavigationDictionary <Type> typeNavigationDictionary,
            PageKey rootPageKey)
        {
            this.TypeNavigationDictionary = typeNavigationDictionary;
            this.PageNavigationDictionary = new NavigationDictionary <Page>();

            this.RootPageKey = rootPageKey;
        }
コード例 #2
0
        private void ShellFrame_Navigated(object sender, NavigationEventArgs e)
        {
            if (NavigationDictionary.ContainsValue(ShellFrame.CurrentSourcePageType))
            {
                RadioButton rb = NavigationDictionary.FirstOrDefault(x => x.Value == ShellFrame.CurrentSourcePageType).Key as RadioButton;
                rb.IsChecked = true;

                if (ShellFrame.CanGoBack)
                {
                    ShellFrame.BackStack.Clear();
                }
            }

            IRefreshable vm = (ShellFrame.Content as Page).DataContext as IRefreshable;

            VM.CurrentViewModel = vm;

            UpdateAppViewBackButtonVisibility(ShellFrame);
        }