I know this question has been asked and answered several times already but I still don't get it. I seem to be missing a piece of understanding.
I have a TabControl bound to an observable list of viewmodels. The viewmodels can be of different types, derived from the same base type, of course. When a viewmodel is added to the list I want the tabcontrol adds a new tabpage based on the type of the view model.
I do not understand how to set up the ContentTemplate of the TabControl to pick the right view based on the type of the view model.
A Basic example can be found here, but I do not get it up and running with dynamic views:
How to bind items of a TabControl to an observable collection in wpf?
Thanks! Johannes