Posted 14 years ago
by Stephen Tapper
I'm trying to dynamically create some tool windows based on an xml file. So I figured I would create an ItemTemplate for a ToolWindowContianer and bind the model objects to the ItemsSource property on the container. However, when I try to set the ItemsSource, I get an exception that says I can't add my type as an item of the DockingWindowContainer.
This is the xaml for my templateIs there a way to do what I'm trying to do?
This is the xaml for my template
<docking:ToolWindowContainer Name="templatedToolContainer">
<docking:ToolWindowContainer.ItemTemplate>
<DataTemplate>
<docking:ToolWindow>
<TextBlock>
...
</TextBlock>
</docking:ToolWindow>
</DataTemplate>
</docking:ToolWindowContainer.ItemTemplate>
</docking:ToolWindowContainer>