I'm fairly new to mobile development in C#, but I decided to dive into Xamarin.Forms to develop for the three major platforms at once. What I would like to do now is create a custom object that contains text, an image, and a button, and I would like to be able to create multiples of them depending on how many sets are present in my database. I aware of the ContentPage class and then saw that ContentView can only contain a single child element, so I'm not sure what type of class I would use in order to create a custom visual object. Ideally, I'd like to be able to do something like the image below:

Add a comment
|
1 Answer
Take a look at the ListView class (API doc). It should do the trick. It's relatively straightforward to create a DataTemplate with a ViewCell that represents the UI for your collection of data objects, which you will then assign to the ListView's ItemsSource property. The result is a scrollable list that updates with your data source.
There are lots of benefits to using this component, including built-in pull-to-refresh, template re-use, and context actions.