Dynamicly created DocumentWindows do not get serialized.

Docking/MDI for WPF Forum

Posted 14 years ago by Craig - Nstrument
Avatar
I setup my docking site like this:

<docking:DockSite x:Name="_dockSite" CanDocumentWindowsRaft="True" >
<docking:Workspace >
<docking:TabbedMdiHost >
<docking:TabbedMdiContainer />
</docking:TabbedMdiHost>
</docking:Workspace>
</docking:DockSite>


In code behind I create document windows like this:

DocumentWindow newContent = new DocumentWindow(_dockSite, "Name", "Title", null, part);
newContent.Tag = part.PartKey;
newContent.Activate();

Than to save my current layout I do this:

DockSiteLayoutSerializer _layoutSerializer = new DockSiteLayoutSerializer();
string xml = _layoutSerializer.SaveToString(_dockSite);

But the Xml it creates contains no entries for the DocumentWindow(s) that I create.
I've ommited some of the attributes in the xml below for clarity:

<DockSiteLayout>
<AutoHideHost>
<AutoHideTabStrip Side="Left">
<ToolWindowContainer>
<UIElement xsi:type="ToolWindowRef" Name="TreeView" />
</ToolWindowContainer>
</AutoHideTabStrip>
<AutoHideTabStrip Side="Right">
<ToolWindowContainer >
<UIElement xsi:type="ToolWindowRef" Name="ToolPanelView" />
</ToolWindowContainer>
</AutoHideTabStrip>
</AutoHideHost>
<Content xsi:type="SplitContainer">
<UIElement xsi:type="Workspace">
<Content xsi:type="TabbedMdiHost">
<Content xsi:type="TabbedMdiContainer" />
</Content>
</UIElement>
<UIElement xsi:type="ToolWindowContainer" >
<UIElement xsi:type="Track" />
</UIElement>
<UIElement xsi:type="ToolWindowContainer" >
<UIElement xsi:type="Track" />
</UIElement>
</Content>
<RaftingHosts />
<ToolWindows>
<ToolWindow Name="ToolPanelView" />
<ToolWindow Name="TreeVie" />
</ToolWindows>
</DockSiteLayout>


It's worth noting that toolwindows do get serialized as the xml shows.

Thanks
Craig.

[Modified at 01/24/2010 02:10 PM]

Comments (3)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Craig,

Right now layouts will only save tool windows since their lifetime is generally different than document windows. We have an item on our TODO list to add an option for saving document windows as well.


Actipro Software Support

Posted 14 years ago by Craig - Nstrument
Avatar
Any ETA on when you might get to this? We do all dynamic generated content so this is kind of a show stopper for us.

Thanks
Craig
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Craig,

While it is a higher priority TODO item for Docking/MDI, we just did a huge round of updates for Docking/MDI and will likely be updating several of our other products before we get back into this sort of thing.

If you do need it immediately, one option is to hire us at an hourly rate to implement it. If that is an option you'd like to pursue, you can read more about it here:
http://www.actiprosoftware.com/Purchase/ConsultingServices.aspx

It has worked out well for other customers in the past who have needed a feature immediately, because when consulting we make the feature implementation our top new development priority.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.