Direct workspace content lost after deserialization

Docking/MDI for WPF Forum

Posted 3 years ago by Andrew Hanlon
Version: 16.1.0630
Environment: Windows 10 (64-bit)
Avatar

When deserializing, if the SerializationBehavior is set to `All`, then any Direct content of the workspace will be lost.

My best guess would be that when the SerializationBehaviour is set to `All` that the current code deserializes and replaces the workspace, rather than deserializing its child (which should stil have the same functionality).

Obviously the workaround is to set the SerializationBehavior to `ToolWindowsOnly` when using direct content; however this is not practical when using a common DockSiteLayoutSerializer as recommended in the help:

...but also highly recommend that instead of creating a new layout serializer any time you do a layout serialization, you instead keep a reference to a single app-wide instance of the layout serializer and use that for each layout serialization.

 

My current workaround is to create an attached property that can be set on the DockSite to specify the SerializationBehavior and is read before serialization/deserialization.

[Modified 3 years ago]

Comments (4)

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Andrew,

What kind of Workspace child are we talking about here?  I'm assuming not a MDI host?


Actipro Software Support

Posted 3 years ago by Andrew Hanlon
Avatar

Hi,

Your assumption is correct, any custom content as discussed in the 'Workspace with Custom Content' documentation section.

Thanks.

P.S. Extremely happy with the vNext Docking solution overall!

Answer - Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Andrew,

Thanks for reporting this.  We've fixed it for the next build.  If you'd like a preview build to try out, please write our support address and mention this thread.


Actipro Software Support

Posted 3 years ago by Andrew Hanlon
Avatar

Awesome, thank you kindly.

The latest build of this product (v2018.1 build 0675) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.