![Avatar](https://secure.gravatar.com/avatar/fa32ce2c3ff0dffff68c73720e6e7080.jpg?s=64&d=identicon&r=g)
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 7 years ago]