WeifenLuo.WinFormsUI.Docking.DockPane.RestoreToPanel C# (CSharp) Method

RestoreToPanel() public method

public RestoreToPanel ( ) : void
return void
        public void RestoreToPanel()
        {
            DockPanel.SuspendLayout(true);

            IDockContent activeContent = DockPanel.ActiveContent;

            for (int i = DisplayingContents.Count - 1; i >= 0; i--)
            {
                IDockContent content = DisplayingContents[i];
                if (content.DockHandler.CheckDockState(false) != DockState.Unknown)
                    content.DockHandler.IsFloat = false;
            }

            DockPanel.ResumeLayout(true, true);
        }

Usage Example

Example #1
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.DockPanel.AllowEndUserDocking || !DockPane.DockPanel.AllowEndUserNestedDocking)
                {
                    return;
                }

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