/// <exclude />
        protected override void WndProc(ref Message m)
        {
            if (m.Msg == (int)Win32.Msgs.WM_MOUSEACTIVATE)
            {
                DockPane.Activate();
                base.WndProc(ref m);
                return;
            }
            else if (m.Msg == (int)Win32.Msgs.WM_LBUTTONDOWN)
            {
                if (DockPane.DockPanel.AllowRedocking && DockPane.AllowRedocking &&
                    !DockHelper.IsDockStateAutoHide(DockPane.DockState))
                {
                    DockPane.DockPanel.DragHandler.BeginDragPane(DockPane, ClientRectangle.Location);
                }
                else
                {
                    base.WndProc(ref m);
                }
                return;
            }
            else if (m.Msg == (int)Win32.Msgs.WM_LBUTTONDBLCLK)
            {
                base.WndProc(ref m);

                if (DockHelper.IsDockStateAutoHide(DockPane.DockState))
                {
                    DockPane.DockPanel.ActiveAutoHideContent = null;
                    return;
                }

                DockContent activeContent = DockPane.DockPanel.ActiveContent;
                for (int i = 0; i < DockPane.Tabs.Count; i++)
                {
                    DockContent content = DockPane.Tabs[i].Content;
                    if (DockPane.IsFloat)
                    {
                        DockPane.RestoreToPanel();
                    }
                    else
                    {
                        DockPane.Float();
                    }
                    if (activeContent != null)
                    {
                        activeContent.Activate();
                    }
                }
                return;
            }

            base.WndProc(ref m);
        }
Ejemplo n.º 2
0
        protected override void WndProc(ref Message m)
        {
            if (m.Msg == (int)Win32.Msgs.WM_LBUTTONDBLCLK)
            {
                if (DockHelper.IsDockStateAutoHide(DockPane.DockState))
                {
                    DockPane.DockPanel.ActiveAutoHideContent = null;
                    return;
                }

                if (DockPane.IsFloat)
                {
                    DockPane.RestoreToPanel();
                }
                else
                {
                    DockPane.Float();
                }
            }
            base.WndProc(ref m);
        }