Beispiel #1
0
        private void OnItemInvoked(WinUI.NavigationViewItemInvokedEventArgs args)
        {
            var item = _navigationView.MenuItems
                       .OfType <WinUI.NavigationViewItem>()
                       .First(menuItem => (string)menuItem.Content == (string)args.InvokedItem);
            var pageKey = item.GetValue(NavHelper.NavigateToProperty) as string;

            _navigationService.Navigate(pageKey);
        }
Beispiel #2
0
        private async void CreateNewQuiz()
        {
            var result = await _quizService.AddQuiz(NewQuiz);

            if (result)
            {
                _navigationService.Navigate(typeof(QuizzenViewModel).FullName);
            }
        }
Beispiel #3
0
        private void NavigateToEditTeamPage(int selectedIndex)
        {
            if (selectedIndex == -1)
            {
                return;
            }

            Messenger.Default.Send(Teams[selectedIndex]);
            _navigationService.Navigate(typeof(EditTeamViewModel).FullName);
        }
Beispiel #4
0
        private void NavigateToRound(Round selectedRound)
        {
            if (selectedRound == null)
            {
                return;
            }

            Messenger.Default.Send(selectedRound);
            _navigationService.Navigate(typeof(RoundViewModel).FullName);
        }
Beispiel #5
0
 private void NavigateToCreateQuizPage()
 {
     _navigationService.Navigate(typeof(CreateQuizViewModel).FullName);
 }