protected internal virtual void OnControlRemoved(Control control, int index) { if (!_state[s_stateDisposing]) { SuspendLayout(); RowManager.OnControlRemoved(control, index); // if previously added - remove. if (control is ISupportToolStripPanel controlToBeDragged && controlToBeDragged.ToolStripPanelRow == this) { controlToBeDragged.ToolStripPanelRow = null; } ResumeLayout(true); if (ControlsInternal.Count <= 0) { ToolStripPanel.RowsInternal.Remove(this); Dispose(); } } }