private async void OnOpenSongDetailView(int?songId) { if (SongDetailViewModel != null && SongDetailViewModel.HasChanges) { var result = MessageBox.Show("You've made changes. Navigate away?", "Question", MessageBoxButton.OKCancel); if (result == MessageBoxResult.Cancel) { return; } } SongDetailViewModel = _songDetailViewModelCreator(); await SongDetailViewModel.LoadAsync(songId); }
private void AfterSongDeleted(int songId) { SongDetailViewModel = null; }