Auto Close on drag drop

Docking/MDI for WPF Forum

Posted 7 years ago by Lutz Kretzschmar
Version: 17.1.0651
Avatar

We have a window that can be set to auto-hide containing a list of files. These can be dragged onto controls on the main document surface (under the flyout). Sometimes the flyout obscures the target so we want to automatically auto-hide the flyout when drag has started. 

I have figured out (what I think is a hacky way of) how do to this immediately on when drag/drop starts, but I was wondering if there's a way that the flyout can be made to hide only once the mouse has left its client area. Or is there a mechanism in the framework that supports this behavior?

Thanks,

- Lutz

Comments (3)

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

Hi Lutz,

I don't believe we have anything built in for that, however if you can put together a simple sample project that shows this scenario, perhaps we can use that to test out some enhancements that would help handle it automatically for you.  Please send any sample you come up with to our support address and in your email reference this thread.  Be sure to remove any obj/bin folders from the ZIP and rename the .zip file extension so it doesn't get spam blocked.  Thanks!


Actipro Software Support

Posted 7 years ago by Lutz Kretzschmar
Avatar

Ok, thanks. I ended up hooking into DragStart and walking up the visual tree to find the AutoHidePopup and then calling CloseImmediately() on that after about half a second delay. 

We're in shipping mode, so currently don't have time to put together a sample, sorry.

- Lutz

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

Hi Lutz,

You also could do something like this, that might be a little easier:

dockSite.PrimaryDockHost.CloseAutoHidePopup(false, true);


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.