I would say, whenever possible Templates are the way to go in WPF. They define how controls or data is displayed in the UI. Using templates, it is possible to use any object (not only strings) as the content of a Button, for example. If you set the content of a Button to be an object of type MyType
, WPF will look for a DataTemplate for MyType
in the resources and use that one if it is found. If no DataTemplate is found, it will use the ToString()
method of that object and display the result.
In your scenario, you could use a simple ContentControl
for your details view on the right and define different DataTemplate
s for each item type. If not every item needs a different template (i.e. some types share the same template), you could implement a ContentTemplateSelector
to determine the correct DataTemplate
programmatically.
The Data Templating Overview gives a good introduction into that topic.
HTH, good luck!