I have a MVVM WPF application with a tree containing self referenced data, this data is bound to the tree with a hierarchical converter. (As in example: http://www.telerik.com/h
If you have actual different types, you can specify the type in the HierarchicalDataTemplate using DataType attribute (How do I use the DataType property on a WPF DataTemplate?) and WPF will select the template based on the class.
If you don't have different types, but will depend on a property or value inside the class, you'll need to specify a DataTemplateSelector (http://tech.pro/tutorial/807/wpf-tutorial-how-to-use-a-datatemplateselector)