Add option to disable double-click creating a floating window.
See original GitHub issueA 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:
- Created 6 years ago
- Comments:11 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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:
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?