public RibbonButtonList(IEnumerable <RibbonButton> buttons, IEnumerable <RibbonItem> dropDownItems) : this() { if (buttons != null) { List <RibbonButton> items = new List <RibbonButton>(buttons); _buttons.AddRange(items.ToArray()); //add the handlers foreach (RibbonItem item in buttons) { item.Click += new EventHandler(item_Click); } } if (dropDownItems != null) { _dropDownItems.AddRange(dropDownItems); //add the handlers foreach (RibbonItem item in dropDownItems) { item.Click += new EventHandler(item_Click); } } }
public RibbonButtonList(IEnumerable <RibbonButton> buttons, IEnumerable <RibbonItem> dropDownItems) : this() { if (buttons != null) { List <RibbonButton> items = new List <RibbonButton>(buttons); _buttons.AddRange(items.ToArray()); } if (dropDownItems != null) { _dropDownItems.AddRange(dropDownItems); } }