Hidden toolwindow expands to size of the main window

Docking/MDI for WPF Forum

Posted 6 years ago by Steven Correia
Version: 13.1.0582
Avatar

Hi,

I'm working on a program with different tool windows docked on the left and right of the main window. All of these windows have auto hide functionality. When I hide the window and then hover over (or click) the name on the side to open it again, the window expands to the same size as it was before the window was hidden. If I then move this tool window, dock it on the bottom, for example, of the main window and then hide it again, as I hover over the name of the tool window the tool window expands to the size of almost the entire window. I compared my program with the Sample Browser (RibbonWindow and Docking Demo Browser) to find that it has the same functionality. Is there a way to prevent the tool window from expanding to take up so much space? I would like the tool window to expand to the size when it is docked but not hidden, so it does not take up the entire dock-able window length or height. Is there a variable that controls the size of an expanded hidden toolwindow?

Thank you in advance!!

Comments (4)

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

Hi Steven,

We haven't seen this.  Can you give exact steps to make it happen in one of our samples so we can see what you see?


Actipro Software Support

Posted 6 years ago by Steven Correia
Avatar

Thank you for your reply!

From the sample browser, I launched the RibbonWindow with Docking Demo Browser. I clicked the pin icon in the tool window on the right side of the browser to hide the "Document Outline & Properties" toolwindows. When I hover over the name of the window with the mouse, the hidden window expands to its original size, before it was hidden. The next step was to click the pin again to so the window is not hidden. This also works fine and the window is pinned back to it original position and size. I then took the toolwindow "Document Outline" and dragged it and docked it to the bottom of the RibbonWindow. I clicked the pin to hide the toolwindow, and bot the "document Outline" and "Properties" toolwindows are hidden. The effect I'm talking about happens when I hover over the name of the hidden toolwindow and it expands to take up the entire space below the Ribbon menu. This is the behavior that I would likt to control, so when I hover over or click on the name of the hidden toolwindow, it does not expand to the entire working area.

The effect also happens when I dock the two windows on the right side of the RibbonWindow, but it is only the "Properties" toolwindow that expands to take up so much space.

Is this behavior controllable?

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

Hi Steven,

Thanks for the repro steps.  This case is particularly tricky because when you first auto-hide the docking window, it stores its size for that auto-hide state, and that initial size comes from the current docked state size (tall and thin).  Then when you un-auto-hide and dock to the bottom and auto-hide again, since the desired auto-hide size has already been set, it is trying to reuse that.  Until the user resizes the auto-hide container that is.

The good news is that these sizes can be retrieved and set at any time via the DockSite.GetControlSizeForState and SetControlSizeForState methods.  So with those methods, you are able to set sizes for the AutoHide state, etc.  Note that setting them will only affect the next time the properties are accessed.  For auto-hide state, after they are set, they should affect the next time the flyout is opened.


Actipro Software Support

Posted 6 years ago by Steven Correia
Avatar

Thank you so much for the quick reply. Those methods were just what were needed to achieve the desired functionality.

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.