Inside __XmlLayoutSerializer.LayoutSerializationCallback__, if we set __LayoutSerializationCallbackEventArgs.Cancel = true__, LayoutDocuments & LayoutAnchorables are still loaded into the view (with null Content properties).
Looking through the source code, it appears as though LayoutAnchorable.Close() & LayoutDocument.Close() are executed, but inside these functions, __this.Root.Manager is null__.
Am I missing an extra step somewhere?
Comments: ** Comment from web user: scottfmcleod **
Looking through the source code, it appears as though LayoutAnchorable.Close() & LayoutDocument.Close() are executed, but inside these functions, __this.Root.Manager is null__.
Am I missing an extra step somewhere?
Comments: ** Comment from web user: scottfmcleod **
Sorry for the delay - attached is a very simple sample.
"initial_layout.xml" is a serialized layout from avalondock. It is in the root of the project so you can view it, and referenced as a resource.
When you run the application, and press the "Load Layout" button, layout Deserialization happens in MainWindow.xaml.cs. Here, as LayoutSerializationCallbackEventArgs.Cancel is set to true, I wouldn't expect any LayoutAnchorables or LayoutDocuments to be restored in the view.
Looking forward to your reply, let me know if you have any suggestions or need any additional clarity.