Exemple #1
0
        void OnSongTapped(IUICommand command)
        {
            SongView songView = (SongView)command.Id;

            MediaElement1.Source = new Uri(songView.Location);
            MediaElement1.Play();
            currentSong.SetSong(songView);
            StackPanelCurrentSong.DataContext = currentSong;
        }
Exemple #2
0
        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;
        }