Select a data template by item type programatically in WPF
- by Michael Stoll
Hi all,
unfortunately the WPF ToolbarTray does not support binding to a collection of ToolbarViewModels (Correct me, if I'm wrong). Thus I want to create the Toolbars programmatically. So there are two tasks, which I don't know how to do:
Select the data template based on the item type.
Instantiate the data template as toolbar
Both should do…