ToolWindow is not restored to its previous state if it was docked in another ToolWindow

Docking/MDI for WPF Forum

Posted 11 months ago by Matthew Bristow
Version: 17.2
Platform: .NET 4.6
Environment: Windows 10 (64-bit)
Avatar

Not sure if this a bug or intentional but I have been refactoring some of our code to use the IsFloating property, and the changes you made to remember state of floating windows.

https://www.actiprosoftware.com/community/thread/23598/detecting-when-a-floating-window-is-docked#112822

When you dock a ToolWindow (A) within another ToolWindow (B) and then close and open ToolWindow (B) its state is not remembered and ToolWindow (B) is now floating rather than being docked in ToolWindow as again (A). [Docked maybe the wrong terminology, stacked is probably more apropriate] 

This can be reproduced in your MVVM ToolWindows example using Snoop. I can dock Tool 2 into Tool 1. So now they are stacked and a TabControl is visible. I can modify the IsOpen property in the ViewModel from true to false for Tool 2 using Snoop. When I change the IsOpen property back to true it is now floating. 

Comments (2)

Posted 11 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Matt,

I think by "stacked" you mean what we call "attached" where two or more tool windows are in the same tool window container, and a tab strip is visible to select between them.

I updated our MVVM ToolWindows QuickStart so that when I press any key, it will get the "Tool 1" VM and set its IsOpen = true.  When I start the sample, I attached "Tool 2" to the docked "Tool 1" on the right, and still within the primary dock host.   I closed "Tool 1" and then pressed a key that activated my code to update "Tool 1"'s IsOpen to true.  It popped back as a tab and was attached to "Tool 2".  Am I doing something wrong in that sequence, since it worked as intended?

Also keep in mind I'm doing this in our latest 2018.1 maintenance release.  If you are on an older version and see something different, I'd urge you to try our latest 2018.1 maintenance release since it could be a bug we already fixed in that case.


Actipro Software Support

Posted 11 months ago by Matthew Bristow
Avatar

This is working as expected in the 2018.1 maintenance release.

The latest build of this product (v2019.1 build 0683) was released 21 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.