Skip to main content

ButtonCollection

Namespace: Wisej.Web.Ext.RibbonBar

Assembly: Wisej.Web.Ext.RibbonBar (4.1.0.0)

Represents a collection of RibbonBarItemButton in a RibbonBarItemButtonGroup.

public class ButtonCollection : RibbonBarCollectionBase<RibbonBarItemButtonGroup, RibbonBarItemButton>

Methods​

Instance member Add(item)​

Adds the specified item to the collection.

ParameterTypeDescription
itemRibbonBarItemButtonThe RibbonBarItemButton to add to the collection.

The Orientation of the item is changed to Horizontal and its Parent is set to the RibbonBarGroup that contains the button group.

Example:

Adding a button to a button group:

this.buttonGroupAlign.Buttons.Add(new RibbonBarItemButton { Name = "justify", ImageSource = "icon-justify" });

Instance member Insert(index, item)​

Inserts the specified item in the collection at the specified index .

ParameterTypeDescription
indexInt32The position to insert the specified RibbonBarItemButton at.
itemRibbonBarItemButtonThe RibbonBarItemButton to insert in the collection.

The Orientation of the item is changed to Horizontal and its Parent is set to the RibbonBarGroup that contains the button group.

Example:

Inserting a button as the first button of a button group:

this.buttonGroupAlign.Buttons.Insert(0, new RibbonBarItemButton { Name = "alignLeft", ImageSource = "icon-left" });