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;
}
}