Hi. I use the following serializer to load my layout:
_serializer = new DockSiteLayoutSerializer
{
DocumentWindowDeserializationBehavior = DockingWindowDeserializationBehavior.AutoCreate,
SerializationBehavior = DockSiteSerializationBehavior.All,
ToolWindowDeserializationBehavior = DockingWindowDeserializationBehavior.AutoCreate,
};
//...
//other code
//...
_serializer.LoadFromFile(file, _dockSite);
During deserialization any open document window that was not present in saved layout is destroyed. Is there an easy way to preserve some of those windows? I want them to stay docked in approximately the same position as before deserialization.
I have tried settings e.Cancel = true; in WindowsClosing event, but it does not seem to work as expected during deserialization: widows are closed regardless.
[Modified 8 years ago]