This project is read-only.

RestoreLayout error

Dec 8, 2009 at 2:41 PM

Saving layout to a stream then converting the stream to a base 64 string which is saved to a user setting.  When restoring the string is read from the user setting then converted to a byte array which is used to create a stream that is passed into the RestoreLayout method.  I've tried restoring the layout using different event handlers but I always get the error below.  I've tried the window OnLoad, OnInitialized even the docking manager OnLoaded.

Exception message:

"Unable to deserialize a docking layout while DockingManager control is unloaded"

stack trace:

at AvalonDock.DockingManager.RestoreLayout(XmlDocument doc)

at AvalonDock.DockingManager.RestoreLayout(Stream backendStream)

Dec 8, 2009 at 2:46 PM

Found one thing, I still had the call to restore the layout in the window constructor and in the dock manager onLoaded event handler, after taking out the restore call in the constructor window loads and restores the layout but none of the panes are visible.