Is it possible to double click on a Tab to float and dock it?

Docking/MDI for WPF Forum

Posted 8 months ago by rex hui
Version: 19.1.0685
Avatar

Our customer has requested to be able to double click a tab to float it and double click again to undo it (meaning "move to main document group")

Is this possible?

Thanks!

Comments (4)

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

Hi Rex,

I'm sorry but we don't have that feature at this time.  I'll write down the suggestion.


Actipro Software Support

Posted 8 months ago by rex hui
Avatar

Any suggestions on how to intercept the mouse double click event?

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

It would be difficult to do externally since the tabs are AdvancedTabItem controls deep within templates.  You could see if the PreviewMouseLeftButtonDown event for those bubbles up to the Window and add a handler there that would look for them to see if two occurred in quick sequence for a double-click.  You could watch for PreviewMouseDoubleClick too, but handling of the normal left mouse button might prevent that from ever happening.

It might be even harder for tool window container title bars since when those are floating, they are treated as "native" Win32 non-client title bar areas.  Thus I don't believe the normal WPF events will fire for them then.


Actipro Software Support

Posted 8 months ago by rex hui
Avatar

Thank you! I think I have figured out how to do that.

The latest build of this product (v2020.1.1) was released 15 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.