After calling SaveLayout, I get the resulting xml:
<?xml version="1.0" encoding="utf-8" ?>
- <xamDockManager version="10.2.20102.1014">
- <contentPanes>
<contentPane name="LogPrimaryPane" location="Unknown" lastActivatedTime="2010-09-21T16:36:02.646119Z" />
<contentPane name="SimpleEditorPane" location="DockedBottom" visibility="Collapsed" />
<contentPane name="ConsiderationPane" location="DockedRight" visibility="Collapsed" />
<contentPane name="TestBarPane" location="DockedBottom" visibility="Collapsed" />
<contentPane name="FailureDetailsPane" location="DockedBottom" visibility="Collapsed" />
<contentPane name="AssetHistoryPane" location="DockedBottom" visibility="Collapsed" />
</contentPanes>
- <panes>
- <splitPane splitterOrientation="Horizontal" location="DockedBottom" extent="250">
<contentPane name="SimpleEditorPane" />
</splitPane>
- <splitPane splitterOrientation="Vertical" location="DockedRight" extent="250">
<contentPane name="ConsiderationPane" />
- <splitPane splitterOrientation="Horizontal" location="DockedBottom" extent="200">
- <splitPane splitterOrientation="Vertical">
<contentPane name="TestBarPane" />
<contentPane name="FailureDetailsPane" />
<contentPane name="AssetHistoryPane" />
</panes>
</xamDockManager>
When I later load this layout, I get the exception "Invalid pane location for ContentPane 'LogPrimaryPane'."
Since I don’t have control over the way SaveLayout works, is there any way I can get LoadLayout to work without having to modify the xml directly?
Thanks
Dan
I recently experienced this bug. To reproduce the bug, you need to embed a ContentPane into the Content area of the XamDockManager without embedding it in a SplitPane, TabGroupPane, and DocumentContentHost. And the ContentPane needs to be activated to add it to saved layout. The XamDockManager will add the ContentPane to the saved layout with PaneLocation set to Unknown even though the ContentPane is not really a part of layout since its layout cannot be modified since it's not correctly embedded into a DocumentContentHost.
In the attached sample, you can see how the ContentPane gets added to Dock Manager saved layout with location set to unknown. On some instances, calling LoadLayout with this layout throws an exception (though for some reason it does not throw an exception with the attached sample). The bug for Infragistics is that it should not be adding the ContentPane to layout if its PaneLocation is Unknown.
However, for users, if you have this problem, either do not use a ContentPane for the content if you do not want to host them as documents or make sure to embed the ContentPane in the following manner:
Hello Dan,
It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. So I have been looking through your post and I created a sample project for you. Basically I there is a XamDockMAnager with a couple of panes and two buttons (Save and Load) and it seems like that everything works ok. If this is still an issue for you feel free to modify my sample and send it baqck to me.
Feel free to write me if you have further questions.