In DocPanel.Persistor.cs, method:
public static void SaveAsXml(DockPanel dockPanel, Stream stream, Encoding encoding, bool upstream)
if upstream is true, this method will close the stream; since it didn't open the stream, it shouldn't close it.
Change (line 355) :
if (!upstream)
{
xmlOut.WriteEndDocument();
xmlOut.Close();
}
else
xmlOut.Flush();
To:
if (!upstream)
{
xmlOut.WriteEndDocument();
}
xmlOut.Flush();