Close autohide windows when drag leaves the window

Docking/MDI for Windows Forms Forum

Posted 6 years ago by Amyn Virani - Software Developer, MicroAutomation, Inc.
Version: 16.1.0331
Avatar

Is there a property that can help in automatically closing a window when a drag event leaves the boundary of the window? I am aware of HideUnfocusedAutoHideToolWindowsOnMouseLeave which works when I am not dragging anything off that window (it closes automatically after a few seconds). I am also aware of the AutoHideShowOnMouseHover which actually does work as expected that is when dragging from 1 autohide window to another autohide window. However none of these 2 properties help in this regard.

Thanks

Comments (3)

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

Hello,

No, I don't believe we have anything included that will do that.  We generally try and follow the guidelines of what Visual Studio does for the docking windows. 

When I drag content from an auto-hide popup in VS and move the mouse out of the popup's bounds, it still remains open.  I am able to hover over another auto-hide tab if I want to open another auto-hide popup.  I think the main reason they don't auto-close it is then it would move focus elsewhere in the app due to the popup closing, which is probably not what the end user would intend.


Actipro Software Support

Posted 6 years ago by Amyn Virani - Software Developer, MicroAutomation, Inc.
Avatar

Thank you for the response.

I am actually seeing a different behavior. When I drag an item from the toolbox both in Visual Studio 2010 and 2017, as soon as the mouse leaves the toolbox window (which was auto-hide popup), the toolbox window automatically hides itself and drag drop is continuing. This is precisely what I am looking for.

[Modified 6 years ago]

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

Hello,

I tried mulitple drag scenarios in VS 2017 and for the most part never saw the auto-hide popup close when dragging out of it.  The only time I did get it to occur was when I had a Windows Form open in the design and I dragged a control from the Toolbox over the Form in the designer.  At that point it closed the auto-hide popup.  When I tried the same with a WPF Window, it didn't close.  And dragging nodes from the Solution Explorer never seemed to close the auto-hide popup either.

I believe you could achieve what you're trying to do by attaching to the DragEnter event of the target control (like a designer control) with code like this:

textBox.DragEnter += (sender, e) => {
	dockManager.HideVisibleAutoHideToolWindow(true);
};

That would close the auto-hide popup when a drag enters the target control.


Actipro Software Support

The latest build of this product (v24.1.1) 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.