Layout and CreationPolicy.NonShared

Docking/MDI for WPF Forum

Posted 6 years ago by Boulay Sylvain - Staubli
Version: 12.2.0571
Avatar

Hi,

I use the Layout Serialization and some ToolWindows are created with the CreationPolicy.NonShared property.

So, the GUID of these ToolWindows are changing at each serialization and so the load of the layout does'nt restore theses ToolWindows.

How can I manage this kind of ToolWindows ?

 

thanks

Sylvain

Sylvain

Comments (3)

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

Hi Sylvain,

If you want layouts to deserialize data properly you will need to use some Name on the tool windows that is common between each session.  The layout serialization uses Name to find and match tool windows it knows about.  The Layout Serialization documentation topic talks about this a bit, so please read through that.


Actipro Software Support

Posted 6 years ago by Boulay Sylvain - Staubli
Avatar

I aggree but here my toolWindow has the same name at each session. I can see it in the serialization file, but the is the UniqueId attribute that changed between each session. From my point of view, this is due to the CreationPolicy.NonShared but I need it because this toolwindow must be created each time an object appears in my model. So how can we do in this case to serialized this kind of toolWindow

Sylvain

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

That shouldn't matter since it matches things by name when linking up serialized tool windows with tool windows in the DockSite.  If you'd like us to help further, please make a new simple sample project that is as small as possible and shows the issue so we can debug it.  Rename the .zip file extension so it doesn't get spam blocked and e-mail it to our support address, referencing this post.  Thanks!


Actipro Software Support

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.