ControlTemplate for DocumentContent

Mar 23, 2012 at 1:39 PM


i would like to use my own class derived from DocumentContent with an individual ControlTemplate.

So i create a ResourceDictionary which defines a style for setting the ControlTemplate.

Then i include this ResourceDictionary in the resources of the xaml code of my derived class, and setting the style as DynamicResource.

The WPF-Editor of VS2010 shows now the correct view of my class.

But when i run the Project the view of my class is shown without my ControlTemplate.

It seems that the AvalonDock Framework overrides my ControlTemplate.

What have i to do to make my ControlTemplate working for the DocumentContent?




Apr 4, 2012 at 6:28 PM

you may try something like that:


<avalonDockLayout:LayoutDocumentPane >


<ContentControl DataContext="{Binding Path=DataItemsCV}" Template="{StaticResource MyTemplate}" />