/// <summary> /// Handles the CollectionModified event of the items control. /// </summary> /// <param name = "sender">The source of the event.</param> /// <param name = "e">The <see cref = "System.EventArgs" /> instance containing the event data.</param> private void ItemsCollectionModified(object sender, ListModificationEventArgs e) { Controls.Clear(); foreach (ActiveButton button in Items) { Controls.Add(button); } CalcSize(); OnPosition(); }
protected virtual void OnCollectionModified(ListModificationEventArgs e) { if (suppressEvents) { return; } if (CollectionModified != null) { CollectionModified(this, e); } }