Selective Layout Persistence for each DockingWindow in a DockSite

Docking/MDI for WPF Forum

Posted 5 years ago by Michael Jelley
Version: 13.2.0592
Avatar

Hello,

We have a complicated application that uses view models to back DocumentWindows. One of our requirements is the application persists tabs that were open, as well as layouts nested within each tab (mostly ToolWindows). However, not all DocumentWindow tabs should persist, and not all ToolWindows should persist, as defined by their respective view models.

There's the crux of the matter - I haven't yet found a way to achieve "selective" layout persistence through the DockSiteLayoutSerializer class or the event handlers it provides access to. All of the events I can access seem to be post-serialization (or deserialization), not hooks that can stop or block serialization for the given window.

Does anyone have any ideas for how this can be achieved using the API? I'll keep tinkering - I'm not to keen on modifying source code (with a Blueprint license).

Thanks,
Michael

Comments (1)

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

Hi Michael,

There isn't really anything built in to support selective serialization of docking windows to a layout data.  That being said, I believe that if you have tool windows A, B, and C when you save the layout data and then reopen it later, if only tool windows A and B are registered with the DockSite at that time, only they will be displayed in the UI depending on the value of DockSiteLayoutSerializer.ToolWindowDeserializationBehavior and DocumentWindowDeserializationBehavior.  You can read more about that in the "Layout Serialization" documentation topic.


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.