Applying layout deserialization to existing tool windows

Docking/MDI for WPF Forum

Posted 9 years ago by Cheetah
Version: 11.1.0542
Avatar
I have a docksite that I'd like to add support for the layout (de)serialization to, but I'm running into some issues. I think some of these may be caused by me doing things "wrong", but I think at least some are issues in the serialization system.

My essential problem is that the layout deserialization seems to want to find existing windows by their UniqueId, or create new ones if no match is found. My ToolWindows are used to display the results of computations that can take minutes or even hours to run, so they can't just be instantiated and put on the screen.

I already have code that will restore the results of all that computation in a reasonably user-friendly fashion (progress bars, cancel buttons). I was hoping that at the end of doing that, I could apply a saved layout to the re-created tool windows.

But the UniqueId property is not settable in any way that I can see, so I can't associate the rebuilt tool windows with the information in the serialized layout.

Comments (2)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Cheetah,

As long as the names of the windows match up, then everything should serialize/deserialze fine. It uses the name to find the existing window, not the GUID.

If that doesn't help, please put together a small sample project that reproduces your issue and email it over then we can take a closer look. Be sure to remove any executables or change the extension of the zip file to ensure it gets past our email filters.


Actipro Software Support

Posted 9 years ago by Cheetah
Avatar
Aah, I had thought that I had names on my windows, but it turned out I did not. After fixing that and resolving some other issues on my end, the layout deserialization appears to be working properly.

Thanks for the tip :)
The latest build of this product (v2019.1 build 0683) 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.