How to bind WPF TabControl ContentTemplate to an observable collection of different ViewModels
<p>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.</p>

<p>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. </p>

<p>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.</p>

<p>A Basic example can be found here, but I do not get it up and running with dynamic views:</p>

<p><a href="https://stackoverflow.com/questions/1261118/how-to-bind-items-of-a-tabcontrol-to-an-observable-collection-in-wpf">How to bind items of a TabControl to an observable collection in wpf?</a></p>

<p>Thanks! Johannes</p>