void OnSongTapped(IUICommand command) { SongView songView = (SongView)command.Id; MediaElement1.Source = new Uri(songView.Location); MediaElement1.Play(); currentSong.SetSong(songView); StackPanelCurrentSong.DataContext = currentSong; }
void RandomSongs_LoadCompleted(object sender, LoadCompletedEventArgs e) { songViews = new List <SongView>(); DataServiceCollection <RandomSongs> songs = (DataServiceCollection <RandomSongs>)sender; foreach (RandomSongs song in songs) { SongView songView = new SongView(song); songViews.Add(songView); } SongGrid.ItemsSource = songViews; }