protected virtual void OnItemRemoved(ControlEventArgs e) { // remove the control from the ControlCollection if it hasn't already if (this.Controls.Contains(e.Control)) { this.Controls.Remove(e.Control); } // update the layout of the controls this.DoLayout(); // if (ItemRemoved != null) { ItemRemoved(this, e); } }