Description of Image.
Inheritance: AlbumImageBase, IImage
Example #1
0
 public void TypeConverter_CanConvertImage_IsTrue()
 {
     var converter = new TypeConverter<Image>();
     var image = new Image();
     var canConvert = converter.CanConvert(image.GetType());
     Assert.IsTrue(canConvert);
 }
        //renvoie les images postées par l'utilisateur

        /**
         * Return pictures posted from the user
         */
        public async Task <ImageContainer> createImageContainerFromPosts()
        {
            ImageContainer imageContainer = new ImageContainer();
            var            client_fav     = new ImgurClient(client_id, imgur_token);
            var            endpoint       = new AccountEndpoint(client_fav);
            var            favourites     = await endpoint.GetImagesAsync();

            for (int i = 0; i < favourites.Count(); i++)
            {
                Imgur.API.Models.Impl.Image    galleryImage = (Imgur.API.Models.Impl.Image)(favourites.ElementAt(i));
                Windows.UI.Xaml.Controls.Image imgImgur     = new Windows.UI.Xaml.Controls.Image();
                imgImgur.Source = new BitmapImage(new Uri(galleryImage.Link, UriKind.Absolute));
                imgImgur.Name   = galleryImage.Id;
                imageContainer.AddImageSource(imgImgur);
            }
            return(imageContainer);
        }