user3024750 user3024750 - 2 months ago 24
C# Question

Xamarin - Create a ListView with images and fill it with List of Object

I'm relatively new to Xamarin.Android and am looking to build something I did in WPF in Xamarin as an Android App.

In WPF I used an

ItemsControl
with an
Image
Tag and then bound them to it.
In Xamarin I have not found something like this though (only the
RepeaterView
which I found quite hard to figure out/implement it with images).

It should look like this:

Preview of the App

I would like to populate this
ListView
(if it is one) with a
List<Object>
and load the URL of the images, stored in a property in the
Object
, into one Image each.

Now my question, how would I do it theoretically? I'm looking for keywords/tutorials/documentations on classes/controls that allow me to do something like that.

Help is greatly appreciated!

Answer

I think GridView is what you want. See this and this tutorials which show how to create apps looking like

So you should create a GridView and populate ImageViews as item and SetImageBitmap() from your List<>.