ComponentFactory.Krypton.Docking.KryptonDockingControl.PropogateAction C# (CSharp) Method

PropogateAction() public method

Propogates an action request down the hierarchy of docking elements.
public PropogateAction ( DockingPropogateAction action, string uniqueNames ) : void
action DockingPropogateAction Action that is requested to be performed.
uniqueNames string Array of unique names of the pages the action relates to.
return void
        public override void PropogateAction(DockingPropogateAction action, string[] uniqueNames)
        {
            switch (action)
            {
                case DockingPropogateAction.StartUpdate:
                    // Only the first of several 'StartUpdate' actions needs actioning
                    if (_updateCount++ == 0)
                    {
                        // Place the obscuring control at the top of the z-order
                        Control.Controls.SetChildIndex(_obscure, 0);

                        // Set obscuring control to take up entire client area and be made visible, this prevents
                        // the drawing of any control underneath it and so prevents any drawing artifacts being seen
                        // until the end of all operations resulting from the request action.
                        _obscure.SetBounds(0, 0, Control.Width, Control.Height);
                        _obscure.Visible = true;
                    }
                    break;
                case DockingPropogateAction.EndUpdate:
                    // Only final matching 'EndUpdate' needs to reverse start action
                    if ((_updateCount > 0) && (_updateCount-- == 1))
                    {
                        // Multi operation might have caused a change in the inner minimum
                        EnforceInnerMinimum();

                        _obscure.Visible = false;
                    }
                    break;
                case DockingPropogateAction.ShowPages:
                case DockingPropogateAction.ShowAllPages:
                    // Let base class perform actual requested actions
                    base.PropogateAction(action, uniqueNames);

                    // Ensure that showing extra pages does not trespass on the inner minimum
                    if ((action == DockingPropogateAction.ShowPages) ||
                        (action == DockingPropogateAction.ShowAllPages))
                        EnforceInnerMinimum();
                    break;
                default:
                    // Let base class perform actual requested actions
                    base.PropogateAction(action, uniqueNames);
                    break;
            }
        }

Usage Example

 private void OnDockspaceSeparatorNotMoved(object sender, EventArgs e)
 {
     if (_update)
     {
         // Inform our owning control that the update has ended, allowing the client area to be drawn
         KryptonDockingControl c = GetParentType(typeof(KryptonDockingControl)) as KryptonDockingControl;
         c.PropogateAction(DockingPropogateAction.EndUpdate, (string[])null);
         _update = false;
     }
 }