internal void OnDockItemStateChanged(DockItemStateEventArgs e) { if (_isDockItemStateChanging) { if (FlagSaveFocus) { DockItem focusedItem = FocusedItem; if (focusedItem.IsAutoHide) { _activatedPanes.Remove(focusedItem.FirstPane); } CoerceValues(); DockItem activeItem = ActiveItem; if (activeItem != null) { activeItem.Activate(); } else if (focusedItem != null) { FocusedItem = null; } _saveFocusItem = null; } CoerceValues(); _isDockItemStateChanging = false; } _dockControl.OnDockItemStateChanged(e); RaiseEvents(); }
/// <summary>Raises the <see cref="DockItemStateChanged"/> event.</summary> /// <param name="e">A <see cref="DockItemStateEventArgs"/> that contains the event data.</param> /// <remarks> /// <para>This method allows derived classes to handle the event without attaching a delegate. /// This is the preferred technique for handling the event in a derived class.</para> /// <para>When overriding in a derived class, be sure to call the base class's /// method so that registered delegates receive the event.</para> /// </remarks> protected internal virtual void OnDockItemStateChanged(DockItemStateEventArgs e) { EventHandler <DockItemStateEventArgs> handler = DockItemStateChanged; if (handler != null) { handler(this, e); } }
internal void OnDockItemStateChanging(DockItemStateEventArgs e) { _isDockItemStateChanging = true; _dockControl.SaveFocus(); _dockControl.OnDockItemStateChanging(e); }