AvalonDock SaveLayout?? RestoreLayout??

Oct 20, 2009 at 10:09 AM

can anybody help me please?

i would like to save my docking layout on my application close even and restore it on load up. i have been trying to use the savelayout property with no result.

could i please have an example on how to do this?

Oct 31, 2009 at 11:35 PM



if (LayoutFile.Exists)
                catch (Exception)
                    // There's a problem with the save file, delete it.


I comment out in file: DockingManager.cs these two lines, and it works fine.

void RestoreLayout(XmlDocument doc)
            //if (!_isControlLoaded)
            //    throw new InvalidOperationException("Unable to deserialize a docking layout while DockingManager control is unloaded");

            if (doc.DocumentElement == null ||
                doc.DocumentElement.Name != "DockingManager")


Mar 3, 2010 at 5:49 PM

I tried this but i still have an issue when i dock panels inside another panels (Not resizing panels only).


I receive the an InvalidOperationException ("The enumerator is not valid because the collection changed.") in the form's show method.


Any ideas?