Each native platform has several controls for handling list display and MvvmCross tries to treat them all in the same way - for each and every platform, MvvmCross provides or uses an ItemsSource and an ItemTemplate property for data-binding.
In this sample, we quickly run through the 4 modern platforms:
- we create a shared PCL core with a single ViewModel which contains a List
- we add a UI for each platform
- within each UI we use one or more templates to show the List and the ListItems
- within the Android and iOS platforms, we also add 2 plugins - File and DownloadCache - in order to provide some Internet image download functionality
With iOS, we do leave some ListItem/cell customisation work 'TODO' - we will return to this in the near future.
Warning: this tutorial does move quite quickly - it's designed for people who have already watched one or more of the previous N+1 videos, and for people who have some knowledge of Mvvm already.
The finished source is available on: https://github.com/slodge/NPlus1DaysOfMvvmCross/tree/master/N-02-KittenView
Previously in N+1:
- N=0 - a first application - http://slodge.blogspot.co.uk/2013/04/n0-first-mvvmcross-application-n1-days.html
- N=1 - tip calc - including the Android Designer and using IoC - http://slodge.blogspot.com/2013/04/n1-tipcalc-second-example-adding-ioc.html