private async void EditTeam() { var result = await _teamService.EditTeam(SelectedTeam.TeamId, SelectedTeam); if (result) { _navigationService.GoBack(); } }
private async void EditQuiz() { var result = await _quizService.EditQuiz(SelectedQuiz.QuizId, SelectedQuiz); DisableOtherQuizzes(); if (result) { _navigationService.GoBack(); } }
private async void SaveRound() { var result = await _roundService.EditRound(SelectedRound.RoundId, SelectedRound); if (result) { _navigationService.GoBack(); } }
protected virtual void UniversalBaseViewModel_BackRequested(object sender, BackRequestedEventArgs e) { if (NavigationService.BackStackDepth == 0) { //Let the system do whatever it's supposed to e.Handled = false; return; } if (NavigationService.CanGoBack && AllowGoingBack) { NavigationService.GoBack(); e.Handled = true; } else { e.Handled = true; //Swallow the event and do nothing } }
private void OnBackRequested(WinUI.NavigationView sender, WinUI.NavigationViewBackRequestedEventArgs args) { _navigationService.GoBack(); }