/// <summary> /// Provides support for z-ordering of all popup-forms of the owning Form. /// </summary> /// <param name="e"></param> protected override void OnActivated(EventArgs e) { base.OnActivated(e); if (this.dockManager == null) { return; } Form dockForm = this.dockManager.FindForm(); if (dockForm != null) { //remove and add ourselves again to update the z-order dockForm.RemoveOwnedForm(this); dockForm.AddOwnedForm(this); } DockWindow activeWindow = this.dockManager.ActiveWindow; if (activeWindow != null && activeWindow.FindForm() == this) { return; } foreach (DockTabStrip strip in ControlHelper.GetChildControls <DockTabStrip>(this.dockContainer, true)) { if (strip.ActiveWindow != null && strip.DockManager == this.dockManager) { this.dockManager.ActiveWindow = strip.ActiveWindow; break; } } }
/// <summary> /// Initializes a new instance of the <see cref="RedockFloatingState">RedockFloatingState</see> class. /// </summary> /// <param name="window"></param> public RedockFloatingState(DockWindow window) : base(window, DockState.Floating) { Form form = window.FindForm(); if (form is FloatingWindow) { this.floatingWindow = new WeakReference(form); } }