I've got a class FruitViewModel
. It describes ViewModels for ListBox
items.
<ListBox ItemsSource="{Binding Fruits}">
And I've got
class BananaViewModel : FruitViewModel
and
class AppleViewModel : FruitViewModel
Fruits
contains BananaViewModel
s and AppleViewModel
s which is bound to ItemsSource
.
How can I make different templates for apples and bananas? They should be in one list but have different templates