I have a bunch of datatemplates I use to display various sql-views in an ItemsControl. I don't know which datatemplate i'm going to use until run-time. (every view has different columns) Next to that, I made a generic dynamic datatemplate for all those views that don't need anything special.
When I display the view I want to first look in all the available datatemplates if there is one that matches, else use the default dynamic datatemplate.
My question is how can I 'search' a datatemplate by name in code? Usercontrol is also possible.
Thanks,
Elger