
I have a MainView with a Docksite that contains a TabbedMDIHost and ToolWindow. This is bound using DocumentItemsSource to a ObservableCollection of Views in my MainViewModel, lets call them ObservableCollection<Child1View> Child1ViewCollection.
In MAINVIEW.XAML
<docking:DockSite x:Name="dockSite" DocumentItemsSource="{Binding Child1ViewCollection}">
<docking:SplitContainer Orientation="Horizontal">
<docking:ToolWindowContainer >
<docking:ToolWindow Title="Open Workspaces" DefaultDockSide="Left" Style="{StaticResource ToolWindowStyle}">
<...ToolWindowContents>
</docking:ToolWindow>
</docking:ToolWindowContainer>
<docking:Workspace>
<docking:TabbedMdiHost x:Name="TabbedMdiHost_Workspaces" TabStripPlacement="Top"/>
</docking:Workspace>
</docking:SplitContainer>
</docking:DockSite>
Each Child1View.xaml then contains their own Docksite, bound in their DocumentItemsSource to an ObservableCollection<Child2View> Child2ViewCollection in Child1ViewModel.
In CHILDVIEW1.XAML
<docking:DockSite x:Name="dockSite_Child" DocumentItemsSource="{Binding Child2ViewCollection}">
<docking:Workspace>
<docking:TabbedMdiHost>
<docking:TabbedMdiContainer x:Name="TabbedMdiHost" TabStripPlacement="Top">
</docking:TabbedMdiContainer>
</docking:TabbedMdiHost>
</docking:Workspace>
</docking:DockSite>
In my MainView the tab control populated with Child1View tabs works perfectly and fires WindowsRegistered / SourceChanged events when the collection is changed. But within the child view, although the Child2ViewCollection is initialised and populated, the views are never opened, no Window Registered / Requested or SourceChanged Events fire. If I explicitly add a document window in using XAML it does appear.
Any advice on where I am going wrong when the implementation of both docksites is the same?
[Modified 3 years ago]