private static void RefreshDockPane(DockPane pane) { pane.RefreshChanges(); pane.ValidateActiveContent(); }
internal void SetPaneAndVisible(DockPane pane) { SetPane(pane); SetVisible(); }
private void ResumeSetDockState(bool isHidden, DockState visibleState, DockPane oldPane) { ResumeSetDockState(); SetDockState(isHidden, visibleState, oldPane); }
internal void SetDockState(bool isHidden, DockState visibleState, DockPane oldPane) { if (IsSuspendSetDockState) { return; } if (DockPanel == null && visibleState != DockState.Unknown) { throw new InvalidOperationException(Strings.DockContentHandler_SetDockState_NullPanel); } if (visibleState == DockState.Hidden || (visibleState != DockState.Unknown && !IsDockStateValid(visibleState))) { throw new InvalidOperationException(Strings.DockContentHandler_SetDockState_InvalidState); } DockPanel dockPanel = DockPanel; if (dockPanel != null) { dockPanel.SuspendLayout(true); } SuspendSetDockState(); DockState oldDockState = DockState; if (m_isHidden != isHidden || oldDockState == DockState.Unknown) { m_isHidden = isHidden; } m_visibleState = visibleState; m_dockState = isHidden ? DockState.Hidden : visibleState; if (visibleState == DockState.Unknown) { Pane = null; } else { m_isFloat = (m_visibleState == DockState.Float); if (Pane == null) { Pane = DockPanel.DockPaneFactory.CreateDockPane(Content, visibleState, true); } else if (Pane.DockState != visibleState) { if (Pane.Contents.Count == 1) { Pane.SetDockState(visibleState); } else { Pane = DockPanel.DockPaneFactory.CreateDockPane(Content, visibleState, true); } } } if (Form.ContainsFocus) { if (DockState == DockState.Hidden || DockState == DockState.Unknown) { DockPanel.ContentFocusManager.GiveUpFocus(Content); } } SetPaneAndVisible(Pane); if (oldPane != null && !oldPane.IsDisposed && oldDockState == oldPane.DockState) { RefreshDockPane(oldPane); } if (Pane != null && DockState == Pane.DockState) { if ((Pane != oldPane) || (Pane == oldPane && oldDockState != oldPane.DockState)) { /* * Without this an early refresh can be triggered while the dimensions of the form * aren't calculated completely because the form could be still hidden although * isHidden says FALSE. */ if (Pane.DockWindow == null || Pane.DockWindow.Visible || Pane.DockState == DockState.Document) { RefreshDockPane(Pane); } } } if (oldDockState != DockState) { if (DockState == DockState.Hidden || DockState == DockState.Unknown || DockHelper.IsDockStateAutoHide(DockState)) { DockPanel.ContentFocusManager.RemoveFromList(Content); } else { DockPanel.ContentFocusManager.AddToList(Content); } OnDockStateChanged(EventArgs.Empty); } ResumeSetDockState(); if (dockPanel != null) { dockPanel.ResumeLayout(true, true); } }
public void FloatAt(Rectangle floatWindowBounds) { DockPane pane = DockPanel.DockPaneFactory.CreateDockPane(Content, floatWindowBounds, true); }
protected void ShowTabPageContextMenu(Point position) { DockPane.ShowTabPageContextMenu(this, position); }
internal TabCollection(DockPane pane) { m_dockPane = pane; }
protected virtual Pane CreatePane(DockPane dockPane) { return(new Pane(dockPane)); }
protected internal Pane(DockPane dockPane) { m_dockPane = dockPane; }