2
votes

Using Xamarin Forms I tried subclassing a ItemsView to create a view that does something like a ListView in order to display an observable collection of viewmodels with a template, but relevant members of ItemsView are internal (a.o. the constructor and a vital property TemplatedItems, of type TemplatedItemsList)

Is ItemsView Intended to be subclassed, and if not: is there an alternative way to create such a view?

1

1 Answers

0
votes

If you look at the documentation the snippet would suggest that, at least technically, it should be subclassed:

public abstract class ItemsView<TVisual> : View,    IItemsView<TVisual>
where TVisual : Xamarin.Forms.BindableObject

However, the question is why would you want to? Unless you have a very specific reason I would be looking to use the listView where the TVisual type would be of ViewCell.

More instruction and information on creating ListViews can be found here:

http://iosapi.xamarin.com/?link=T%3aXamarin.Forms.ListView