Exemplo n.º 1
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            if (e.NavigationMode == NavigationMode.New)
            {
                MusicClientAsync client = new MusicClientAsync("uJka8T6ZDhdVDP-t1_zm", "9NdAMgcSdzWK1aczjfnQuA");
                var genres = await client.GetGenres();
                if (genres.Error == null)
                { 
                    ResultsListBox.ItemsSource = genres.Result;
                }

                else MessageBox.Show(Convert.ToString(genres.Error));

            }
        }
Exemplo n.º 2
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            if (e.NavigationMode == NavigationMode.New)
            {
                MusicClientAsync client = new MusicClientAsync("uJka8T6ZDhdVDP-t1_zm", "9NdAMgcSdzWK1aczjfnQuA");
                var artists = await client.GetTopArtistsForGenre(NavigationContext.QueryString["id"],itemsPerPage:30);
              
                
                //   var artists = await client.GetMixes(NavigationContext.QueryString["id"], itemsPerPage: 30);
                if (artists.Error == null)
                {

                    ResultsListBox.ItemsSource = artists.Result;
                }

                else MessageBox.Show(Convert.ToString(artists.Error));

            }
        }