I cannot use the close and open method as the users have saved layout to an XML document and reopening the document window does not put the document window in the same place
I have tried
<docking:DocumentWindow Title="Title" CanClose="False" x:Name="DocumentWindowName" Visibility="Collapsed">
This will hide the document window tab so that the document window cannot be activated again, but if the layout was saved with the collapsed window active then for some reason the document window is shown, but the tab is not
So basically I need to be able to load a layout and then hide a document window if there is no data for it to display or show if there is data
Below is the code I tried, Window1 is still displayed even though its tab is not
<docking:DockSite Grid.Row="1" CanDocumentWindowsRaft="True" x:Name="dockingSite">
<docking:SplitContainer>
<docking:Workspace>
<docking:TabbedMdiHost>
<docking:TabbedMdiContainer>
<docking:DocumentWindow Title="Title1" CanClose="False" x:Name="Name1" Visibility="Collapsed">
<ContentControl Regions:RegionManager.RegionName="Region1"/>
</docking:DocumentWindow>
<docking:DocumentWindow Title="Title2" CanClose="False" x:Name="Name2">
<ContentControl Regions:RegionManager.RegionName="Region2"/>
</docking:DocumentWindow>
<docking:DocumentWindow Title="Title3" CanClose="False" x:Name="Name3">
<ContentControl Regions:RegionManager.RegionName="Region3"/>
</docking:DocumentWindow>
</docking:TabbedMdiContainer>
</docking:TabbedMdiHost>
</docking:Workspace>
</docking:SplitContainer>
</docking:DockSite>