ButtonCollection
Namespace: Wisej.Web.Ext.RibbonBar
Assembly: Wisej.Web.Ext.RibbonBar (4.1.0.0)
Represents a collection of RibbonBarItemButton in a RibbonBarItemButtonGroup.
- C#
- VB.NET
public class ButtonCollection : RibbonBarCollectionBase<RibbonBarItemButtonGroup, RibbonBarItemButton>
Public Class ButtonCollection
Inherits RibbonBarCollectionBase(Of RibbonBarItemButtonGroup, RibbonBarItemButton)
Methods
Add(item)
Adds the specified item to the collection.
| Parameter | Type | Description |
|---|---|---|
| item | RibbonBarItemButton | The 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" });
Insert(index, item)
Inserts the specified item in the collection at the specified index .
| Parameter | Type | Description |
|---|---|---|
| index | Int32 | The position to insert the specified RibbonBarItemButton at. |
| item | RibbonBarItemButton | The 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" });