I've data-bound `DockingManager`, which is a part of `DataTemplate`:
```
<xcad:DockingManager Grid.Row="1"
AnchorablesSource="{Binding PropertyPages}"
DocumentsSource="{Binding Documents}"
LayoutItemTemplateSelector="{Binding PanesTemplateSelector, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}">
<xcad:DockingManager.LayoutItemContainerStyle>
<Style TargetType="{x:Type xcad:LayoutItem}">
<Setter Property="Title" Value="{Binding Model.Title}"/>
<Setter Property="IconSource" Value="{Binding Model.IconSource}"/>
<Setter Property="ContentId" Value="{Binding Model.ContentId}"/>
<Setter Property="IsSelected" Value="{Binding Model.IsSelected, Mode=TwoWay}"/>
<Setter Property="IsActive" Value="{Binding Model.IsActive, Mode=TwoWay}"/>
</Style>
</xcad:DockingManager.LayoutItemContainerStyle>
<xcad:LayoutRoot>
<xcad:LayoutPanel Orientation="Vertical">
<xcad:LayoutDocumentPane/>
<xcad:LayoutAnchorablePane DockHeight="100"/>
</xcad:LayoutPanel>
</xcad:LayoutRoot>
</xcad:DockingManager>
```
The data template is being applied to a `ContentControl` via `ContentTemplateSelector`.
Everything works fine, except the `Layout` property.
Looks like `DockingManager` completely ignores its layout, which was set from XAML, and applies default value, because at run-time I see `LayoutPanel` with horizontal layout and default dock with for anchorables pane.
I've tried to trace `DockingManager` code: `OnLayoutChanged` triggers only once, when `Layout` being created from constructor. Then I can see, that my layout being created during `OnApplyTemplate`, but `DockingManager` doesn't apply it at all.
What's going on?
I'm using the latest toolkit version.
```
<xcad:DockingManager Grid.Row="1"
AnchorablesSource="{Binding PropertyPages}"
DocumentsSource="{Binding Documents}"
LayoutItemTemplateSelector="{Binding PanesTemplateSelector, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}">
<xcad:DockingManager.LayoutItemContainerStyle>
<Style TargetType="{x:Type xcad:LayoutItem}">
<Setter Property="Title" Value="{Binding Model.Title}"/>
<Setter Property="IconSource" Value="{Binding Model.IconSource}"/>
<Setter Property="ContentId" Value="{Binding Model.ContentId}"/>
<Setter Property="IsSelected" Value="{Binding Model.IsSelected, Mode=TwoWay}"/>
<Setter Property="IsActive" Value="{Binding Model.IsActive, Mode=TwoWay}"/>
</Style>
</xcad:DockingManager.LayoutItemContainerStyle>
<xcad:LayoutRoot>
<xcad:LayoutPanel Orientation="Vertical">
<xcad:LayoutDocumentPane/>
<xcad:LayoutAnchorablePane DockHeight="100"/>
</xcad:LayoutPanel>
</xcad:LayoutRoot>
</xcad:DockingManager>
```
The data template is being applied to a `ContentControl` via `ContentTemplateSelector`.
Everything works fine, except the `Layout` property.
Looks like `DockingManager` completely ignores its layout, which was set from XAML, and applies default value, because at run-time I see `LayoutPanel` with horizontal layout and default dock with for anchorables pane.
I've tried to trace `DockingManager` code: `OnLayoutChanged` triggers only once, when `Layout` being created from constructor. Then I can see, that my layout being created during `OnApplyTemplate`, but `DockingManager` doesn't apply it at all.
What's going on?
I'm using the latest toolkit version.