question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add option to disable double-click creating a floating window.

See original GitHub issue

A computer-challenged customer is having difficulties accidentally double-clicking the dockpanel tabs which causes them to undock and turn into a floating window. This can be a problem when not expecting it. Setting the DockAreas property is not sufficient as the ability to undock is still desired - just not when double-clicked.

Option added in DockPanel.cs:

        private bool m_floatOnDoubleClick;
        [LocalizedCategory("Category_Docking")]
        [LocalizedDescription("DockPanel_FloatOnDoubleClick_Description")]
        [DefaultValue(true)]
        public bool AllowFloatOnDoubleClick
        {
            get
            {
                return m_floatOnDoubleClick;
            }
            set
            {
                m_floatOnDoubleClick = value;
            }
        }

Option checked in DockPaneStripBase.cs:

        [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
        protected override void WndProc(ref Message m)
        {
            if (m.Msg == (int)Win32.Msgs.WM_LBUTTONDBLCLK)
            {
                base.WndProc(ref m);

                int index = HitTest();
                if (DockPane.DockPanel.AllowEndUserDocking && DockPane.DockPanel.AllowFloatOnDoubleClick && index != -1)
                {
                    IDockContent content = Tabs[index].Content;
                    if (content.DockHandler.CheckDockState(!content.DockHandler.IsFloat) != DockState.Unknown)
                        content.DockHandler.IsFloat = !content.DockHandler.IsFloat;	
                }

                return;
            }

            base.WndProc(ref m);
            return;
        }

Help text added in Strings.resx: DockPanel_FloatOnDoubleClick_Description Allow document to float (undock) when tab is double-clicked.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jakehedlundcommented, Mar 22, 2018

Totally understand, that’s why I made the three-line addition and submitted it instead of just suggesting the feature.

This option would also provide the inverse option that the FloatWindow class already has:

private bool m_doubleClickTitleBarToDock = true; public bool DoubleClickTitleBarToDock { get { return m_doubleClickTitleBarToDock; } set { m_doubleClickTitleBarToDock = value; } }

Anyway, I do like DockPanelSuite and how feature-rich it is. Keep up the good work.

On Tue, Mar 20, 2018 at 8:09 PM, Lex Li notifications@github.com wrote:

The current bar to include some feature in DockPanel Suite is higher than ever, as maintainers do have quite limited time to review the changes. Many pull requests are pending due to the same reason.

If something can be easily implemented in a custom theme, then you are not bind to DPS itself and can do whatever changes you like.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dockpanelsuite/dockpanelsuite/issues/546#issuecomment-374822767, or mute the thread https://github.com/notifications/unsubscribe-auth/AJIeYQS5-qEo8dBjWVwjI7OhaJ2GnDowks5tgcROgaJpZM4Sw55E .

0reactions
DanCarterGMSLcommented, Dec 24, 2018

I’ve just tried the double-clicking behaviour in VS 2015, and it doesn’t undock a document. Perhaps this suggests that the VS2015 themes should be changed, so that double-clicking a tab does not undock the document?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable or Disable Double-Click to Maximize Windows ...
This tutorial will show you how to enable or disable double-click to maximize windows vertically for your account in Windows 7, Windows 8, ......
Read more >
visual studio 2010 - Turn off double-click undock in VS2010
I keep accidentally double-clicking my tabs in VS2010 and undocking them. Is it possible to turn off this behavior? Note: I'm using Document ......
Read more >
Double-clicking on the window header maximizes the pane ...
Hi, We observe that double-clicking on a floating RadPane maximizes the floating window, making it to cover all the docking area and going ......
Read more >
"Doubleclick to minimize enabled" prompt on Mac
In my Mac settings, I enabled doubleclick on window title to minimize. And it works. But, randomly I get this incredibly annoying prompt...
Read more >
How to disable the pop-up that emerges when double- ...
Open PromptFunctions.js in the following location ..\Web ASPx\javascript with Wordpad or Notepad. Search for `AddItemsbyListObjectForHIInTree`.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found