Further to Gareth's last comments...
Question: On deserialising page child displays, why are we loosing layout width when using ToolWindow objects?
History
We had changed our functionality a couple of months again, by replacing Page content to use ToolWindow objects rather than previously DocumentWindow objects.
Scenario to create the problem
Create test layouts: One page containing 2 child screens, with the first child filling most of the screen and the second child filling the remainder.
Run Old Application that uses DockWindow implementation
- Old layout deserializes and opens correctly
- New layout throws exception with message: Cannot place windows in MDI since no MDI host was located as the direct child of the DockSite's Workspace
Run New Application that user ToolWindow implementation
- Old version displays both child displays with equal width, but both taking display 2 width and docked on the right. Most of the page content is empty.
- New version displays both child displays with equal width, each taking 50% of the available page content space. WHY IS THIS HAPPENING?
Fragments of XML serialised content
Old version using DocumentWindow:
<Content xsi:type="Workspace">
<Content xsi:type="TabbedMdiHost">
<Content xsi:type="SplitContainer" Orientation="Horizontal" DockedSize="1674,200">
<UIElement xsi:type="TabbedMdiContainer" DockedSize="1471,200" SelectedWindowUniqueId="fe51163e-886a-47e9-839e-25a1bfb0bb50">
<UIElement xsi:type="DocumentWindowRef" UniqueId="fe51163e-886a-47e9-839e-25a1bfb0bb50" />
</UIElement>
<UIElement xsi:type="TabbedMdiContainer" SelectedWindowUniqueId="9b39a155-65cf-4447-9611-fd14d2fd17e0">
<UIElement xsi:type="DocumentWindowRef" UniqueId="9b39a155-65cf-4447-9611-fd14d2fd17e0" />
</UIElement>
</Content>
</Content>
</Content>
<DocumentWindows>
<DocumentWindow UniqueId="fe51163e-886a-47e9-839e-25a1bfb0bb50" SerializationId="Waveform4931a01a82884156b101452a3f490be9" ContainerDockedSize="1471,200" IsOpen="true" State="Document" />
<DocumentWindow UniqueId="9b39a155-65cf-4447-9611-fd14d2fd17e0" SerializationId="Waveform531217a0e2f24c579a10293875734ea4" IsOpen="true" State="Document" />
</DocumentWindows>
New Version using ToolWindow:
<Content xsi:type="SplitContainer" Orientation="Horizontal" DockedSize="1674,907">
<UIElement xsi:type="ToolWindowContainer" DockedSize="1471,907" SelectedWindowUniqueId="24ff4532-10b5-48b7-9c34-f811f7d22e5e">
<UIElement xsi:type="ToolWindowRef" UniqueId="24ff4532-10b5-48b7-9c34-f811f7d22e5e" />
</UIElement>
<UIElement xsi:type="ToolWindowContainer" SelectedWindowUniqueId="7f1e526a-7bd4-4a13-ad2a-66c2f6f6b99b">
<UIElement xsi:type="ToolWindowRef" UniqueId="7f1e526a-7bd4-4a13-ad2a-66c2f6f6b99b" />
</UIElement>
</Content>
<ToolWindows>
<ToolWindow UniqueId="24ff4532-10b5-48b7-9c34-f811f7d22e5e" SerializationId="Waveformc95d8a233a8c4883b23efb04c30c8289" ContainerDockedSize="1471,907" IsOpen="true" State="Docked" />
<ToolWindow UniqueId="7f1e526a-7bd4-4a13-ad2a-66c2f6f6b99b" SerializationId="Waveformff5c8fe973b34efbbf43aa621f0d37bd" IsOpen="true" State="Docked" />
</ToolWindows>