Doubleclick on tool Window do not maximize

Docking/MDI for WPF Forum

Posted 6 months ago by adnan zafar
Version: 24.1.2
Platform: .NET 6.0
Environment: Windows 11 (64-bit)
Avatar

Hi,

When click on title of toolwindow and it's in floating mode, It maximize it. I want to dock it back on double click.

Thanks.

Comments (5)

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

Hello,

This is a tricky situation due to the mix of WPF and Win32 code in place.

Our implementation tells Windows that the title bar area is a non-client title bar area of the window, which means that Windows Win32 logic handles processing of mouse interaction over that area.  This allows drags to start and support Aero snap while dragging, and for double-clicks to toggle state.  With that setup, we don't receive any mouse messages to the title bar in WPF code, since Win32 fully takes over.

If we turn that non-client title bar area hit testing off, that allows those title bars to receive mouse events in our WPF code.  The problem there is that a mouse down in the title bar in our WPF code currently kicks off a window DragMove() call, which invokes Windows Win32 logic, and from that point on again blocks WPF from getting any subsequent mouse events (like double click) until the drag completes.  Thus, even with that approach we can't get the double-click event.

It's unfortunately not really an option to not use DragMove() or native Win32 drag logic, since we would lose Aero snap functionality in that case.


Actipro Software Support

Posted 6 months ago by adnan zafar
Avatar

I am holding my ToolWindow in ToolWindowContainer, can we do any thing in it to perform that functionality?
Another thing I see we have a DefaultDockSide property, If an other property is added for double clikc mode then that may be can handle.
An other question is that When a Window is docked then on double click how is that Window change it's state and go on to float state?

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

Good news, we were able to turn non-client title bar area hit testing off and still maintain all existing functionality by introducing a minimum drag distance before calling DragMove().  This allows us to handle double-clicks.  We added a DockSite.FloatingToolWindowContainerTitleBarDoubleClickMode property you'll be able to set to Dock to get the behavior you want.


Actipro Software Support

Posted 6 months ago by adnan zafar
Avatar

Great. Thanks for update.
Are you going to provide a hotfix or is it going to available in next release?

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

It will be available in the next release.  We don't have a target date yet for that release.


Actipro Software Support

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