DockSiteLayoutSerializer and newly added toolwindows

Posted 10 days ago by Avatar Miguel A.


I have a problem that when DockSiteLayoutSerializer has saved a layout in version 1 and I then add new toolwindows for version 2 of my app, these tool windows aren't shown. I or the customer have to delete the saved layout and then start the app again. Is there a way to say "if toolwindow does not exist in saved layout, then show it" ?

These are my settings

layoutSerializer = new DockSiteLayoutSerializer()
                SerializationBehavior = DockSiteSerializationBehavior.ToolWindowsOnly,
                ToolWindowDeserializationBehavior = DockingWindowDeserializationBehavior.AutoCreate,

[Modified 10 days ago]

Comments (3)

Posted 10 days ago by Actipro Software Support - Cleveland, OH, USA

Hi Miguel,

There's not a way to do that automatically but if you detect that your restored layout was created in the new version, you could just call the Open() method on the new docking windows that were added after the layout load.  That would get them all showing and the next layout save/load cycle would be for the new version so that logic would be skipped from that point forward.

Actipro Software Support
Posted 9 days ago by Miguel A.

//edit: Found a workaround, thanks!

[Modified 8 days ago]

Posted 7 days ago by Actipro Software Support - Cleveland, OH, USA

Hi Miguel,

I know you already found a solution but I saw your original reply.  The layout file is XML.  If you look at the "DockSiteLayout/ToolWindows" element, you can see each ToolWindow child element has a Name.  Those are all the known tool windows.  You could compare that with the tool windows currently in your app and then take action on those not listed in the XML layout file.

Actipro Software Support
Information The latest build of this product (2018.1 build 0674) was released 4 days ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.