private async void buttonRefresh_Click(object sender, RoutedEventArgs e) { MarvelCharacters.Clear(); MarvelComics.Clear(); DetailNameTextBlock.Text = ""; DetailDescriptionTextBlock.Text = ""; DetailImage.Source = null; ComicDetailNameTextBlock.Text = ""; ComicDetailDescriptionTextBlock.Text = ""; ComicBuyTextBlock.Text = ""; ComicDetailImage.Source = null; MyProgressRing.IsActive = true; MyProgressRing.Visibility = Visibility.Visible; while (MarvelCharacters.Count < 10) { Task t = MarvelFacade.PopulateMarvelCharactersAsync(MarvelCharacters); await t; } MyProgressRing.IsActive = false; MyProgressRing.Visibility = Visibility.Collapsed; }
private async void Page_LoadedAsync(object sender, RoutedEventArgs e) { MyProgressRing.IsActive = true; MyProgressRing.Visibility = Visibility.Visible; await MarvelFacade.PopulateMarvelCharactersAsync(MarvelCharacters); MyProgressRing.IsActive = false; MyProgressRing.Visibility = Visibility.Collapsed; }
public async void Refresh() { MyProgressRing.IsActive = true; MyProgressRing.Visibility = Visibility.Visible; MarvelCharacters.Clear(); while (MarvelCharacters.Count < 10) { Task t = MarvelFacade.PopulateMarvelCharactersAsync(MarvelCharacters); await t; } MyProgressRing.IsActive = false; MyProgressRing.Visibility = Visibility.Collapsed; }