How do I bind to an image from an api endpoint?
How do I bind to an image from an api endpoint? Currently, I have an app where I want to display a list of image thumbnails on my layout. I'm able to get the json response from the api endpoint and deserialize it. Now, I have an image object and in that object, I have an image preview url (the thumbnail image). My question is how do I display a list of thumbnail images in my layout? Here's the method that gets called to display images and some property setup: private List<string> images; public List<string> Images { get { return images; } set { SetProperty(ref images, value); } } private async Task DisplayImages() { var imageObj = await _mediaService.GetCatImages(); //imageObj.Hits[i].PreviewUrl; <-- how to a reference to the previewurl but what property should it bind to? } Here's my layout at the moment: <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" ...
