private void nv_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            if (args.IsSettingsSelected)
            {
                contentFrame.Navigate(typeof(Paginas.Definicoes));
            }
            else
            {
                string SelectedItem = args.SelectedItemContainer.Tag.ToString();
                if (SelectedItem != null)
                {
                    switch (SelectedItem)
                    {
                    case "Home_Page":
                        contentFrame.Navigate(typeof(Paginas.Principal));
                        break;

                    case "Gestao_de_utilizadores_Page":
                        contentFrame.Navigate(typeof(Paginas.GestaoDeUtilizadores));
                        break;

                    case "Gestao_de_filmes_Page":
                        contentFrame.Navigate(typeof(Paginas.GestaoDeFilmes));
                        break;

                    case "Gestao_de_atores_Page":
                        contentFrame.Navigate(typeof(Paginas.GestaoDeAtores));
                        break;

                    case "Gestao_de_escritores_Page":
                        contentFrame.Navigate(typeof(Paginas.GestaoDeEscritores));
                        break;

                    case "Gestao_de_generos_Page":
                        contentFrame.Navigate(typeof(Paginas.GestaoDeGeneros));
                        break;

                    case "Gestao_de_diretores_Page":
                        contentFrame.Navigate(typeof(Paginas.GestaoDeDiretores));
                        break;

                    case "Login_Page":
                        contentFrame.Navigate(typeof(Paginas.Login));
                        break;

                    case "Registo_Page":
                        contentFrame.Navigate(typeof(Paginas.Registo));
                        break;

                    case "Perfil_Page":
                        contentFrame.Navigate(typeof(Paginas.Perfil));
                        break;

                    case "Biblioteca_Page":
                        contentFrame.Navigate(typeof(Paginas.Pagina_Biblioteca));
                        break;
                    }
                }
            }
        }
 private void NavigationView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
 {
     SettingsClickCount = 0;
     if (args.IsSettingsSelected)
     {
         MainFrame.Navigate(typeof(SettingsPage), null, transitionInfo);
     }
     else
     {
         var selectedItem    = (NavigationViewItem)args.SelectedItem;
         var selectedItemTag = (string)selectedItem.Tag;
         if (selectedItemTag.StartsWith("http"))
         {
             try
             {
                 MainFrame.Navigate(new Uri(selectedItemTag), null, transitionInfo);
             }
             catch (Exception)
             {
             }
         }
         else if (PageMap.ContainsKey(selectedItemTag))
         {
             var pageType = PageMap[selectedItemTag];
             MainFrame.Navigate(pageType, null, transitionInfo);
         }
     }
 }
Example #3
0
        private void NavigationView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            var item = args.SelectedItem as NavigationViewItem;

            switch (item.Tag)
            {
            case "gui":
                fr_view.Navigate(typeof(GUI));
                break;

            case "display":
                fr_view.Navigate(typeof(AdvancedDisplay));
                break;

            case "sdk":
                fr_view.Navigate(typeof(GetItems));
                break;

            case "smithchart":
                fr_view.Navigate(typeof(SmithChartTemplate));
                break;

            case "convert":
                fr_view.Navigate(typeof(ToEngineering));
                break;

            case "tiles":
                fr_view.Navigate(typeof(TilePinner));
                break;

            case "web":
                Frame.Navigate(typeof(WebViewer), item.Tag);
                break;
            }
        }
Example #4
0
 private void Nv_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
 {
     if (args.SelectedItem != null && args.SelectedItem is ViewItem vi)
     {
         FrameContent.Navigate(views[vi.Id], vi.ParamGetter?.Invoke());
     }
 }
        private void NavView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            if (args.IsSettingsSelected)
            {
                //ContentFrame.Navigate(typeof(ListPerson));
                SettingSplitView.IsPaneOpen = true;
            }
            else
            {
                NavigationViewItem item = args.SelectedItem as NavigationViewItem;

                switch (item.Tag.ToString())
                {
                case "all":
                    ContentFrame.Navigate(typeof(ListPerson));
                    //NavView.Header = "House";
                    break;

                case "add":
                    ContentFrame.Navigate(typeof(AddPerson));
                    break;

                case "get":
                    ContentFrame.Navigate(typeof(GetPerson));
                    break;
                }
            }
        }
Example #6
0
 private void NavigationViewSelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
 {
     if (args.IsSettingsSelected)
     {
         SelectedItem         = null;
         SelectedIndex        = -1;
         SelectedOptionsItem  = null;
         SelectedOptionsIndex = -1;
     }
     else if (args.SelectedItem != null)
     {
         var items   = ItemsSource as IEnumerable <object>;
         var options = OptionsItemsSource as IEnumerable <object>;
         if (items != null && items.Contains(args.SelectedItem))
         {
             SelectedItem         = args.SelectedItem;
             SelectedIndex        = items.ToList().IndexOf(SelectedItem);
             SelectedOptionsItem  = null;
             SelectedOptionsIndex = -1;
         }
         else if (options != null && options.Contains(args.SelectedItem))
         {
             SelectedItem         = null;
             SelectedIndex        = -1;
             SelectedOptionsItem  = args.SelectedItem;
             SelectedOptionsIndex = options.ToList().IndexOf(SelectedItem);
         }
     }
 }
        private void SettingsNavView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            var    selectedItem = (NavigationViewItem)args.SelectedItem;
            string tag          = ((string)selectedItem.Tag);

            if (!args.IsSettingsSelected)
            {
                if (tag == "accountSetMenu")
                {
                    ContentFrame.Navigate(typeof(AccountSettings), null, args.RecommendedNavigationTransitionInfo);
                }
                else if (tag == "bookmarkSetMenu")
                {
                    ContentFrame.Navigate(typeof(BookmarksSettings), null, args.RecommendedNavigationTransitionInfo);
                }
                else if (tag == "historySetMenu")
                {
                    ContentFrame.Navigate(typeof(History), null, args.RecommendedNavigationTransitionInfo);
                }
                else if (tag == "searchSetMenu")
                {
                    ContentFrame.Navigate(typeof(SearchSettings), null, args.RecommendedNavigationTransitionInfo);
                }
                else if (tag == "launchSettingsFile")
                {
                    DataTransfer dt = new DataTransfer();
                    dt.LoadXmlFile();
                }
            }
        }
Example #8
0
        private void NavigationView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            var navParam = new PropertyNavParam()
            {
                tokenSource         = tokenSource,
                navParameter        = navParameterItem,
                AppInstanceArgument = AppInstance
            };

            switch (args.SelectedItemContainer.Tag)
            {
            case "General":
                contentFrame.Navigate(typeof(PropertiesGeneral), navParam, args.RecommendedNavigationTransitionInfo);
                break;

            case "Shortcut":
                contentFrame.Navigate(typeof(PropertiesShortcut), navParam, args.RecommendedNavigationTransitionInfo);
                break;

            case "Library":
                contentFrame.Navigate(typeof(PropertiesLibrary), navParam, args.RecommendedNavigationTransitionInfo);
                break;

            case "Details":
                contentFrame.Navigate(typeof(PropertiesDetails), navParam, args.RecommendedNavigationTransitionInfo);
                break;
            }
        }
        private void NavView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            NavigationViewItem nav_item           = (NavigationViewItem)args.SelectedItem;
            string             selected_item_name = nav_item.Name;

            NavigateTo(selected_item_name);
        }
Example #10
0
        private void NewSample_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            switch ((string)((NavigationViewItem)args.SelectedItem).Tag)
            {
            case "DevParameter":
                ContentFrame.Navigate(typeof(DevParameter), pages);
                break;

            case "CompanyParameter":
                ContentFrame.Navigate(typeof(CompanyParameter), pages);
                break;

            case "ProjectParameter":
                ContentFrame.Navigate(typeof(ProjectParameter), pages);
                break;

            case "SkillParameter":
                ContentFrame.Navigate(typeof(SkillParameter), pages);
                break;

            case "CourseParameter":
                ContentFrame.Navigate(typeof(CourseParameter), pages);
                break;
                //case "GameParameter":
                //    ContentFrame.Navigate(typeof(GameParameter), new CommGamePArameter(pages, service));
                //    break;
            }

            if (pages.Count == 5)
            {
                gameParameter.Visibility = Visibility.Visible;
            }
        }
Example #11
0
        private void NavView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            if (args.IsSettingsSelected)
            {
                ContentFrame.Navigate(typeof(SettingsPage));
            }
            else
            {
                NavigationViewItem item = args.SelectedItem as NavigationViewItem;

                switch (item.Tag)
                {
                case "home":
                    MailHandler.ReplyFlag   = false;
                    MailHandler.ForwardFlag = false;
                    ContentFrame.Navigate(typeof(MainPage));
                    break;

                case "mail":
                    MailHandler.ReplyFlag   = false;
                    MailHandler.ForwardFlag = false;
                    ContentFrame.Navigate(typeof(CreateMailPage));
                    break;
                }
            }
        }
Example #12
0
        private void NavigationView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            var view = sender as NavigationView;
            var item = args.SelectedItem as NavigationViewItem;

            if (item.Content.ToString() == "设置")
            {
                contentFrame.Navigate(typeof(Setting));
            }
            switch (item.Tag)
            {
            case "Today":
                contentFrame.Navigate(typeof(DetailDayView), DateTime.Now.Date);
                break;

            case "Overview":
                contentFrame.Navigate(typeof(Overview));
                break;

            case "DailyView":
                int[] arg = { DateTime.Now.Year, DateTime.Now.Month };
                contentFrame.Navigate(typeof(DailyView), arg);
                break;

            case "MonthlyView":
                contentFrame.Navigate(typeof(MonthlyView), DateTime.Now.Year);
                break;

            default:
                break;
            }
            view.Header = item.Content.ToString();
        }
Example #13
0
        private void MyView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            if (args.IsSettingsSelected)
            {
                MyFrame.Navigate(typeof(Setting));
            }
            else
            {
                NavigationViewItem item =
                    args.SelectedItem as NavigationViewItem;

                switch (item.Tag)
                {
                case "mp3":
                    MyFrame.Navigate(typeof(LocalPlay));
                    break;

                case "mp4":
                    MyFrame.Navigate(typeof(LocalPlay));
                    break;

                case "online":
                    MyFrame.Navigate(typeof(OnlinePlay));
                    break;
                }
            }
        }
Example #14
0
        private void NvMain_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            //先判断是否选中了setting
            if (args.IsSettingsSelected)
            {
                ContentFrame.Navigate(typeof(Pages.SettingsPage), this);
            }
            else
            {
                if (args.SelectedItem is NavigationViewItem)
                {
                    try
                    {
                        var item = args.SelectedItem as NavigationViewItem;
                        switch (item.Name)
                        {
                        case "nvItemText":
                            ContentFrame.Navigate(typeof(Pages.TextPage), this);
                            break;

                        case "nvItemQRCode":
                            ContentFrame.Navigate(typeof(Pages.QRCodePage), this);
                            break;

                        case "nvItemImage":
                            ContentFrame.Navigate(typeof(Pages.ImagePage), this);
                            break;

                        case "nvItemCommonQR":
                            ContentFrame.Navigate(typeof(Pages.CommonQRPage), this);
                            break;

                        case "nvItemCommonOneD":
                            ContentFrame.Navigate(typeof(Pages.CommonOneDPage), this);
                            break;

                        case "nvItemLaTeX":
                            ContentFrame.Navigate(typeof(Pages.LaTeXPage), this);
                            break;

                        case "nvItemCharset":
                            ContentFrame.Navigate(typeof(Pages.CharsetPage), this);
                            break;

                        case "nvItemSvg":
                            ContentFrame.Navigate(typeof(Pages.SvgPage), this);
                            break;

                        default:
                            ContentFrame.Navigate(typeof(Pages.TextPage), this);
                            break;
                        }
                    }
                    catch (Exception ex)
                    {
                        ex.Message.T().ShowMessage("ERROR".T());
                    }
                }
            }
        }
Example #15
0
        private void NavView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            if (args.IsSettingsSelected)
            {
                ContentFrame.Navigate(typeof(ConfigPage));
                NavView.Header = "Configurações";
            }
            else
            {
                NavigationViewItem item = args.SelectedItem as NavigationViewItem;
                switch (item.Tag.ToString())
                {
                case "ficha":
                    ContentFrame.Navigate(typeof(FichaPage));
                    NavView.Header = "Ficha";
                    break;

                case "dados":
                    ContentFrame.Navigate(typeof(DadosPage));
                    NavView.Header = "Dados";
                    break;

                case "editlevels":
                    ContentFrame.Navigate(typeof(EditLevelsPage));
                    NavView.Header = "Editar níveis";
                    break;

                default:
                    ContentFrame.Navigate(typeof(FichaPage));
                    NavView.Header = "Ficha";
                    break;
                }
            }
        }
Example #16
0
 private void NavigationView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
 {
     if (args.SelectedItem != null)
     {
         MainFrame.Navigate(typeof(ConversationPage), (args.SelectedItem as ChatMenuItemControl).ChatConversation);
     }
 }
Example #17
0
        private void NavView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            if (args.IsSettingsSelected)
            {
                ContentFrame.Navigate(typeof(ProfileSettingsView));
            }
            else
            {
                NavigationViewItem item = args.SelectedItem as NavigationViewItem;

                switch (item.Tag)
                {
                case "home":
                    ContentFrame.Navigate(typeof(InboxView));
                    break;

                case "friends":
                    ContentFrame.Navigate(typeof(FriendsListView));
                    break;

                case "camera":
                    ContentFrame.Navigate(typeof(CameraView));
                    break;
                }
            }
        }
Example #18
0
        private void issueView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            NavigationViewItem view = args.SelectedItem as NavigationViewItem;

            try
            {
                switch (view.Tag.ToString())
                {
                case "GoBack":
                    Frame parentFrame = Window.Current.Content as Frame;
                    parentFrame.Navigate(typeof(MainPage));

                    break;

                case "ItemDetailView":
                    ViewIssueFrame.Navigate(typeof(ItemDetailView), detailId);
                    break;

                case "UpdateSelectedItemView":
                    ViewIssueFrame.Navigate(typeof(UpdateSelectedItemView), detailId);
                    break;
                }
            }
            catch { }
        }
Example #19
0
        private void NavigationView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            NavigationViewItem item = args.SelectedItem as NavigationViewItem;

            if (args.IsSettingsSelected)
            {
                contentFrame.Navigate(typeof(SettingsPage), api);
                mainNavView.PaneTitle = "Settings";
                return;
            }
            switch (item.Tag)
            {
            case "account":
                contentFrame.Navigate(typeof(TransactionsPage), api);
                mainNavView.PaneTitle = "Account";
                break;

            case "spaces":
                contentFrame.Navigate(typeof(SpacesPage), api);
                mainNavView.PaneTitle = "Spaces";
                break;

            case "credit":
                Debug.WriteLine("Not implemented yet");
                break;
            }
            contentFrame.BackStack.Clear();
        }
        private void MainNavSelectionChanged(object sender, NavigationViewSelectionChangedEventArgs args)
        {
            if (args.SelectedItemContainer != null)
            {
                string tagValue = args.SelectedItemContainer.Tag
                                  .ToString();

                var newPageType = Navigation.GetViewTypeForMenu(tagValue);

                this.ContentView.CloseSearchViewsIfPresent();

                Type viewBeforeSearch = this.ContentView.TypeOfViewBefore(typeof(SearchView));

                bool shouldAnimate = viewBeforeSearch != null && viewBeforeSearch == newPageType;

                this.ContentView.CloseSearchRootViewIfPresent(shouldAnimate ? EAnimateSearchRootClosure.Yes
                                                                            : EAnimateSearchRootClosure.No);

                bool hasNewPage          = newPageType != null;
                bool hasViewBeforeSearch = viewBeforeSearch != null;
                bool isViewBeforeSearch  = hasViewBeforeSearch && viewBeforeSearch == newPageType;

                bool shouldShowNewPage = hasNewPage || (hasViewBeforeSearch || isViewBeforeSearch);

                if (shouldShowNewPage)
                {
                    this.ContentView.BackStack.Clear();

                    this.ContentView.Navigate(newPageType);
                }
            }
        }
Example #21
0
        private void NavigationView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            var selectedItem = (NavigationViewItem)args.SelectedItem;

            if (selectedItem != null)
            {
                switch (selectedItem.Tag)
                {
                case "CreatePackage":
                    CommandButtonsVisibility(Visibility.Collapsed);
                    contentFrame?.Navigate(typeof(CreatePackage));
                    break;

                case "Packages":
                    CommandButtonsVisibility(Visibility.Visible);
                    contentFrame?.Navigate(typeof(Packages));
                    break;

                case "General":
                    CommandButtonsVisibility(Visibility.Collapsed);
                    contentFrame?.Navigate(typeof(General));
                    break;
                }
            }
        }
        // Fires when the user clicks a menu item
        private void NavView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            // If Settings was clicked, navigate to the Settings page
            if (args.IsSettingsSelected)
            {
                ContentFrame.Navigate(typeof(SettingsPage), this.beerScraper);
            }

            // Else some other menu item was clicked,
            // send necessary data with each page
            else
            {
                NavigationViewItem item = args.SelectedItem as NavigationViewItem;

                switch (item.Tag.ToString())
                {
                case "home":
                    IDictionary <string, Object> data = new Dictionary <string, Object>();
                    data["filter"]      = this.filter;
                    data["beerScraper"] = this.beerScraper;

                    ContentFrame.Navigate(typeof(MainPage), data);
                    break;

                case "filters":
                    ContentFrame.Navigate(typeof(FilterPage), this.filter);
                    break;

                default:
                    ContentFrame.Navigate(typeof(MainPage), this.databaseHandler);
                    break;
                }
            }
        }
Example #23
0
        private void SettingsNav_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            var    selectedItem = (NavigationViewItem)args.SelectedItem;
            string Tag          = (string)selectedItem.Tag;

            switch (Tag)
            {
            case "General":
                SettingsFrame.Navigate(typeof(SettingsPages.General));
                break;

            case "AutoBrightness":
                SettingsFrame.Navigate(typeof(SettingsPages.AutoBrightness));
                break;

            case "Appearance":
                SettingsFrame.Navigate(typeof(SettingsPages.Appearance));
                break;

            case "Hotkeys":
                SettingsFrame.Navigate(typeof(SettingsPages.Hotkeys));
                break;

            case "About":
                SettingsFrame.Navigate(typeof(SettingsPages.About));
                break;
            }
        }
        private void NavgtView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            NavigationViewItem item = args.SelectedItem as NavigationViewItem;

            switch (item.Content)
            {
            case "Home":
                ContentFrame.Navigate(typeof(HomePage));
                break;

            case "Photo":
                ContentFrame.Navigate(typeof(PhotoPage), photoModel);
                break;

            case "Music":
                ContentFrame.Navigate(typeof(MusicPage));
                break;

            case "Video":
                ContentFrame.Navigate(typeof(VideoPage));
                break;

            case "Map":
                ContentFrame.Navigate(typeof(MapPage));
                break;
            }
        }
        private void NavigationView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            if (args.SelectedItem is NavigationViewItem item)
            {
                switch (item.Tag)
                {
                case "general":
                    ContentFrame.Navigate(typeof(GeneralSettings), ViewModel.General);
                    break;

                case "shell":
                    ContentFrame.Navigate(typeof(ShellSettings), ViewModel.Shell);
                    break;

                case "themes":
                    ContentFrame.Navigate(typeof(ThemeSettings), ViewModel.Themes);
                    break;

                case "terminal":
                    ContentFrame.Navigate(typeof(TerminalSettings), ViewModel.Terminal);
                    break;

                case "keyBindings":
                    ContentFrame.Navigate(typeof(KeyBindingSettings), ViewModel.KeyBindings);
                    break;
                }
            }
        }
Example #26
0
        private void NavigationView_SelectionChanged7(NavigationView sender,
                                                      NavigationViewSelectionChangedEventArgs args)
        {
            if (args.IsSettingsSelected)
            {
                contentFrame7.Navigate(typeof(SampleSettingsPage));
            }
            else
            {
                var selectedItem = (NavigationViewItem)args.SelectedItem;
                var header       = (sender.Header = "Sample Page " + (string)selectedItem.Tag).ToString();

                if (header.Contains("1"))
                {
                    contentFrame7.Navigate(typeof(SamplePage1), null, args.RecommendedNavigationTransitionInfo);
                }
                else if (header.Contains("2"))
                {
                    contentFrame7.Navigate(typeof(SamplePage2), null, args.RecommendedNavigationTransitionInfo);
                }
                else if (header.Contains("3"))
                {
                    contentFrame7.Navigate(typeof(SamplePage3), null, args.RecommendedNavigationTransitionInfo);
                }
                else if (header.Contains("4"))
                {
                    contentFrame7.Navigate(typeof(SamplePage4), null, args.RecommendedNavigationTransitionInfo);
                }
                else
                {
                    contentFrame7.Navigate(typeof(SampleSettingsPage), null, args.RecommendedNavigationTransitionInfo);
                }
            }
        }
Example #27
0
        private async void NvSample_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            NavigationViewItem item = args.SelectedItem as NavigationViewItem;

            switch (item.Tag.ToString())
            {
            case "song":
                if (musicCrawler.IsMusicScanned == false)
                {
                    await musicCrawler.EnumerateAndGetAlbumsAsync();
                }
                var songs = await musicCrawler.GetSongsAsync();

                contentFrame.Navigate(typeof(DisPlaySongs), songs);
                nvSample.Header = "Songs";
                break;

            case "albums":
                var album = await musicCrawler.EnumerateAndGetAlbumsAsync();

                contentFrame.Navigate(typeof(DisplayAlbums), album);
                nvSample.Header = "Albums";
                break;

            case "playList":
                contentFrame.Navigate(typeof(PlayLists), musicCrawler);
                nvSample.Header = "Playlist";
                break;

            default:
                break;
            }
        }
Example #28
0
        private async void NavigationView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            if (args.IsSettingsSelected)
            {
                ContentFrame.Navigate(typeof(SettingsPage));
            }
            else
            {
                var selectedItem = (NavigationViewItem)args.SelectedItem;
                if (selectedItem == DependencyGraphNavigationItem)
                {
                    ContentFrame.Navigate(typeof(DependencyGraphPage), ViewModel.DependencyGraph);
                }
                else if (selectedItem == TaskGraphNavigationItem)
                {
                    ContentFrame.Navigate(typeof(TaskGraphPage), ViewModel.TaskGraph);
                }
                else if (selectedItem == OperationGraphNavigationItem)
                {
                    ContentFrame.Navigate(typeof(OperationGraphPage), ViewModel.OperationGraph);
                }
                else if (selectedItem == OpenFileNavigationItem)
                {
                    await LoadFileAsync();

                    this.Navigation.SelectedItem = DependencyGraphNavigationItem;
                }
                else
                {
                    throw new InvalidOperationException("Unknown selection.");
                }
            }
        }
Example #29
0
        private void MenuView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
        {
            if (args.IsSettingsSelected)
            {
                ContentFrame.Navigate(typeof(SettingsPage));
            }
            else
            {
                NavigationViewItem item = args.SelectedItem as NavigationViewItem;

                switch (item.Tag.ToString())
                {
                case "AddCasePage":
                    ContentFrame.Navigate(typeof(AddCasePage));
                    break;

                case "OpenCasesPage":
                    ContentFrame.Navigate(typeof(OpenCasesPage));
                    break;

                case "ClosedCasesPage":
                    ContentFrame.Navigate(typeof(ClosedCasesPage));
                    break;
                }
            }
        }
Example #30
0
 private void NaviViewMain_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
 {
     if (FirstClick)
     {
         FirstClick = false;
         FrameMain.Navigate(typeof(PageZajiao));
         FrameMain.Navigate(typeof(PageParent));
         if (NaviViewItemZajiao == sender.SelectedItem)
         {
             FrameMain.GoBack();
         }
     }
     else
     {
         if (sender.SelectedItem == CurrentItem)
         {
             return;
         }
         if (NaviViewItemZajiao == sender.SelectedItem)
         {
             FrameMain.GoBack();
         }
         if (NaviViewItemParent == sender.SelectedItem)
         {
             FrameMain.GoForward();
         }
     }
     CurrentItem = (NavigationViewItem)sender.SelectedItem;
 }