private void Button_Click(object sender, RoutedEventArgs e) { var song = (sender as Button).DataContext as MusicItem; var songs = mp.MusicList.Where(i => i.Album == song.Album).Select(i => i); MusicHelper.PlayAlbum(songs, 0); }
private void ListView_ItemClick(object sender, ItemClickEventArgs e) { var list = songs.ToList(); var index = (uint)list.IndexOf(e.ClickedItem as MusicItem); MusicHelper.PlayAlbum(songs, index); //OLD //var ci = (MusicItem)e.ClickedItem; //MusicHelper.Play(ci); }