/// <summary> /// Inserts the specified item at the desired index /// </summary> /// <param name="index">Desired index of the item</param> /// <param name="item">Item to insert</param> public override void Insert(int index, RibbonItem item) { CheckRestrictions(item as RibbonButton); item.SetOwner(Owner); item.SetOwnerPanel(OwnerPanel); item.SetOwnerTab(OwnerTab); item.SetOwnerItem(OwnerList); base.Insert(index, item); }
/// <summary> /// Adds the specified item to the collection /// </summary> public override void Add(RibbonItem item) { CheckRestrictions(item as RibbonButton); item.SetOwner(Owner); item.SetOwnerPanel(OwnerPanel); item.SetOwnerTab(OwnerTab); item.SetOwnerItem(OwnerList); item.Click += _ownerList.item_Click; base.Add(item); }