ToolWindow bug after hiding and reshow

Docking/MDI for WPF Forum

Posted 6 years ago by rex hui
Version: 18.1.0670
Platform: .NET 4.7
Environment: Windows 10 (64-bit)
Avatar

To reproduce, run the Docking & MDI Simple IDE Demo.

1. Drag and float the Document Properties toolwindow.

2. Notice you can resize it to very small and everything is correct.

3. Close the Document Properties toolwindow.

4. Reopen it from View->Document Properties.

5. Notice now you cannot resize it to very small size and also it seems like the inner content is limiting the resizing.

 

problem

Comments (4)

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

Hi Rex,

Thanks for pointing this out.  Actually there should be a default minimum size in place of about 136x50 pixels.  We weren't explicitly setting it on the WPF Window that hosts the floating dock host, and something in core Win32 was producing random results in the scenario you gave.  For the next build, we have updated DockSite.InitializeFloatingWindow to set the window's MinWidth/MinHeight.  Once set to a value, it seems more consistent in how Win32 handles things.


Actipro Software Support

Posted 6 years ago by rex hui
Avatar

Thanks. I have a somewhat related question. There is the option AreDocumentWindowsDestroyedOnClose but that doesn't apply to ToolWindows. How do I achieve the same thing with ToolWindows?

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

Hello,

That is correct... tool windows are meant to live on when closed, whereas documents are typically destroyed (removed from the DockSite) when closed.  If you want to destroy a tool window when it is closed, just watch the DockSite.WindowsClosed event and for tool windows, call their Destroy() method.


Actipro Software Support

Posted 6 years ago by rex hui
Avatar

Got it. Thank you!

The latest build of this product (v24.1.2) was released 2 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.