Inheritance: System.Windows.Forms.Form, IDockContent
Ejemplo n.º 1
0
        public DockPanel()
        {
            this._mFocusManager = new FocusManagerImpl(this);
            this._mExtender = new DockPanelExtender(this);
            this._mPanes = new DockPaneCollection();
            this._mFloatWindows = new FloatWindowCollection();

            SuspendLayout();

            this._mAutoHideWindow = new AutoHideWindowControl(this)
            {
                Visible = false
            };
            this.SetAutoHideWindowParent();

            this._mDummyControl = new DummyControl
            {
                Bounds = new Rectangle(0, 0, 1, 1)
            };
            Controls.Add(this._mDummyControl);

            this._mDockWindows = new DockWindowCollection(this);
            Controls.AddRange(new Control[]	{
                this.DockWindows[DockState.Document],
                this.DockWindows[DockState.DockLeft],
                this.DockWindows[DockState.DockRight],
                this.DockWindows[DockState.DockTop],
                this.DockWindows[DockState.DockBottom]
                });

            this._mDummyContent = new DockContent();
            ResumeLayout();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Adds and activates a window to the main editor's dock panel
 /// </summary>
 /// <param name="window">The dockable window</param>
 /// <param name="state">The initial state of the window</param>
 public static void Show(DockContent window, DockState state = DockState.Unknown)
 {
     if (state == DockState.Unknown)
         window.Show(MainDock);
     else
         window.Show(MainDock, state);
 }