internal override void CopyTo(DockTabStrip clone) { base.CopyTo(clone); ToolTabStrip toolClone = clone as ToolTabStrip; if (toolClone != null) { toolClone.autoHidePosition = this.autoHidePosition; } }
protected virtual void UpdateOnCaptionChanged() { if (!string.IsNullOrEmpty(this.caption)) { ToolTabStrip parentStrip = this.TabStrip as ToolTabStrip; if (parentStrip != null && parentStrip.ActiveWindow == this) { parentStrip.CaptionText = this.caption; } } }
/// <summary> /// Updates all associated UI - such as TabItems, Captions, etc. upon TextChanged event. /// </summary> protected virtual void UpdateOnTextChanged() { if (this.TabStripItem != null) { this.TabStripItem.Text = this.Text; } if (this.autoHideTab != null) { this.autoHideTab.Text = this.Text; } ToolTabStrip parentStrip = this.TabStrip as ToolTabStrip; if (parentStrip != null && parentStrip.ActiveWindow == this) { parentStrip.CaptionText = this.Text; } }
private void UpdateCaptions(bool checkDockManager) { List <ToolTabStrip> visibleStrips = new List <ToolTabStrip>(); foreach (Control child in ControlHelper.EnumChildControls(this.dockContainer, true)) { ToolTabStrip strip = child as ToolTabStrip; if (strip == null || strip.Collapsed) { continue; } if (checkDockManager && strip.DockManager != this.dockManager) { continue; } visibleStrips.Add(strip); } bool hasCaption = visibleStrips.Count > 1; foreach (ToolTabStrip strip in visibleStrips) { strip.CanDisplayCaption = hasCaption; strip.PerformLayout(); } if (hasCaption) { this.Text = string.Empty; } else if (visibleStrips.Count == 1) { DockWindow window = ((DockTabStrip)visibleStrips[0]).ActiveWindow; if (window != null) { this.Text = window.Text; } } this.dockContainer.PerformLayout(); }
protected override void UpdateOnTextChanged() { base.UpdateOnTextChanged(); ToolTabStrip parentStrip = this.TabStrip as ToolTabStrip; if (parentStrip == null || parentStrip.ActiveWindow != this) { return; } if (!parentStrip.CaptionVisible && this.DockState == DockState.Floating) { Form floatingParent = this.FloatingParent; Debug.Assert(floatingParent != null, "No floating parent when in DockState.Floating"); if (floatingParent != null) { floatingParent.Text = this.Text; } } UpdateOnCaptionChanged(); }