ToolWindow De-Serialization Problem

Docking/MDI for WPF Forum

Posted 13 years ago by Mark
Version: 11.1.0544
Avatar
Hello,

My problem is that I cannot close the ToolWindows in a nested dock site after they have been de-serialized. The ToolWindows in the outer DockSite work fine after they have been de-serialized. This is strange because the deserialization and create tool window routines are all common code that is shared between DockSites.

If I activate the 'broken' inner ToolWindows in the loaded event after de-serialization, it fixes them but they re-arrange. Also, if I drag a new ToolWindow onto an existing on that is ‘broken’ it will ‘fix’ it. Please note, when the ToolWindows do not close, all of the functionality in their TitleBar is broken (i.e. they cannot be dragged, pinned, etc…).

I have been investigating at this for almost 2 days now and have no answers yet. I made a sample project, but I cannot re-create the problem there. Any ideas about what could be going on here with the information I have provided? Like what would the cause of the Close not to work until it has been Activated after de-serialization?

Thank you,
Mark

Comments (2)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Mark,

Sorry, but we haven't had any reports of similar issues. Your best bet would probably be to remove functionality from your application until the issue goes away. That would give you a better indication at the cause. I'd start with commenting out any event handlers you may have registered for any DockSite event.


Actipro Software Support

Posted 13 years ago by Mark
Avatar
OK, I finally figured this one out.

Because of how our 'parts' load in our application, the inner nested dock site was getting its layout restored before it had fully loaded. The answer was as simple and moving the RestoreLayout call from the DataContextChanged to the Loaded event in the UserControl in which it resides. So, even though the layout was restored and it looked ok, it was not properly restored since it had not fully loaded when it did the restore.
The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.