Delay activating tool windows when dragging over their tabs

Docking/MDI for WPF Forum

Posted 10 years ago by Brian Collins
Version: 13.2.0592
Avatar

I'm working on an application where tool windows have tabs at the top and many are below the document area. When a user drags an item from a tool window to the document area, if the mouse cursor moves over another tool window's tab, then that tool window is activated immediately. Users typically don't expect this, since their mouse is moving quickly and is not over the tab for a significant amount of time. It's useful to be able to switch tabs while dragging, but it's a bit too easy.

Is there any way to delay the activation of tool windows when dragging over them? If not, is there any way to prevent specific tool windows from being activated while a drag operation is in progress?

Comments (2)

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

Hi Brian,

There isn't a built-in way to delay the activation of the docking window.  Right now this is the DockingWindow code that controls that behavior:

protected override void OnDragEnter(DragEventArgs e) {
	// Select the tab
	this.Activate(false);

	// Call the base method
	base.OnDragEnter(e);
}

You could override that method in an inherited class of ToolWindow or DocumentWindow and just not call the base method if you want to prevent it.


Actipro Software Support

Posted 10 years ago by Brian Collins
Avatar

Thanks, that works for me.

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.