Exemple #1
0
        private void FavoriteButton_Click(object sender, RoutedEventArgs e)
        {
            var  button  = sender as Button;
            Song favSong = (Song)button.DataContext;

            SongManager.AddFavoriteSong(favSong);
            if (SongTextBlock.Text == "Favorite Songs")
            {
                SongManager.GetFavoriteSongs(songs);
            }
            else if (SongTextBlock.Text == "All Songs")
            {
                SongManager.GetAllSongs(songs);
            }
        }