Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Commented Unassigned: LayoutSerializationCallbackEventArgs.Cancel not respected (in v 2.1) [20803]

$
0
0
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 **

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.


Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>