/// <summary> /// Initializes a new <see cref="DockWindow">DockWindow</see> instance. /// </summary> public DockWindow() { this.dockState = this.DefaultDockState; this.previousDockState = this.dockState; this.desiredDockState = this.dockState; this.autoHideSize = Size.Empty; this.allowDockStates = AllowedDockState.All; this.closeAction = this.DefaultCloseAction; this.toolCaptionButtons = ToolStripCaptionButtons.All; this.documentButtons = DocumentStripButtons.All; this.defaultFloatingSize = FloatingWindow.DefaultFloatingSize; }
/// <summary> /// /// </summary> protected internal override void UpdateButtons() { base.UpdateButtons(); if (this.DockManager == null) { return; } DockWindow active = this.ActiveWindow; if (active == null) { return; } DocumentStripButtons buttons = active.DocumentButtons; //update close button if ((buttons & DocumentStripButtons.Close) == 0) { this.closeButton.Visibility = ElementVisibility.Collapsed; } else { if (this.DockManager.CanChangeWindowState(active, DockState.Hidden, false)) { this.closeButton.Visibility = ElementVisibility.Visible; } else { this.closeButton.Visibility = ElementVisibility.Collapsed; } } //update active window list button if ((buttons & DocumentStripButtons.ActiveWindowList) == 0) { this.overflowMenuButton.Visibility = ElementVisibility.Collapsed; } else { this.overflowMenuButton.Visibility = ElementVisibility.Visible; } }