protected override void OnNavigatedTo(NavigationEventArgs e) { _images.Clear(); if (_user == null) { _user = (UserInfo)e.Parameter; } var gallery = Task.Run(async() => await ImgurApi.GetGallery()); gallery.Wait(); AddGalleryView(gallery.Result); }
private async void TextBox_CharacterReceived(UIElement sender, CharacterReceivedRoutedEventArgs args) { IEnumerable <IGalleryItem> gallery; if (Search.Text == "") { gallery = await ImgurApi.GetGallery(); } else { gallery = await ImgurApi.SearchGallery(Search.Text, _user); } _images.Clear(); AddGalleryView(gallery); }
private async void Image_DoubleTapped(object sender, DoubleTappedRoutedEventArgs e) { var image = Images.SelectedItem as ImageInfo; ImgurApi.FavoriteImage(image.id, _user); }