I am saving the layout using the savelayout method on the docking control.
This works fine (although i have no pane titles but that is another question) until I float panes on external monitors (I have 3).
When I do this and I use the save layout method I get an error 'Managed Debugging Assistant: 'FatalExecutionEngineError'. The runtime has encountered a fatal error. The address of the error was at 0x65bf395f, on thread 0x4548. The error code is 0x80131623. This error may be a bug in the CLOR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
My code (in the Window closing event) is:
MemoryStream stream = new MemoryStream();
DockMain.SaveLayout(stream);
stream.Seek(0, SeekOrigin.Begin);
StreamReader reader = new StreamReader(stream);
var layout = reader.ReadToEnd();
Then i persist layout to a file.
Can you please assist.
Rob