private void OnSelectedSongChangedManually(object sender, SelectedSongChangedManuallyEventArgs e) { try { viewModel.Parent.Parent.CurrentPlaylist = viewModel; } catch (System.Exception exc) { MobileDebug.Service.WriteEventPair("OnSelectedSongChangedManuallyFail", "CurrentPlaylist", viewModel?.Parent?.Parent?.CurrentPlaylist, exc); } Frame.GoBack(); }
private void lbxSongs_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (Source == null || Source.Count == 0) { return; } Song selectedSong = lbxSongs.SelectedItem as Song; if (selectedSong != null && CurrentSong != selectedSong) { SelectedSongChangedManuallyEventArgs args = new SelectedSongChangedManuallyEventArgs(CurrentSong, selectedSong); CurrentSong = selectedSong; SelectedSongChangedManually?.Invoke(this, args); } else if (selectedSong != CurrentSong && lbxSongs.Items.Contains(CurrentSong)) { lbxSongs.SelectedItem = CurrentSong; } }