The objective is to have different layout for items in a ListView depending on the item’s type. For example some items would have text and a button, other text and image, others text and check-box etc.
Having a DataTemplate for each kind of item would solve the problem. I looked into DataTrigger but it seems to allow only change properties of items, but not the layout template. Does the framework provider any convenient way of doing this?
I believe
DataTemplateSelectoris what you’re looking for.Or use
DataType.