Skip to main content

RibbonBarItemCollection

Namespace: Wisej.Web.Ext.RibbonBar

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

Represents a collection of RibbonBarItem in a RibbonBarGroup.

public class RibbonBarItemCollection : RibbonBarCollectionBase<RibbonBarGroup, RibbonBarItem>

Properties​

Instance member Item(name)​

RibbonBarItem: Returns the first RibbonBarItem with the specified name .

Value: The first RibbonBarItem with the specified name or null.

The comparison with the Name property is case insensitive.

Throws:

Example:

Retrieving a RibbonBarItem by name:

var bold = (RibbonBarItemButton)this.ribbonBarGroup1.Items["bold"];
bold.Pushed = true;

Methods​

Instance member Add(item)​

Adds the specified item to the collection.

ParameterTypeDescription
itemRibbonBarItemThe RibbonBarItem to add to the collection.

The Parent of the item is set to the RibbonBarGroup that owns this collection.

Example:

Adding a new RibbonBarItem:

this.ribbonBarGroup1.Items.Add(new RibbonBarItemCheckBox { Name = "ruler", Text = "Ruler" });

Instance member Insert(index, item)​

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

ParameterTypeDescription
indexInt32The position to insert the specified RibbonBarItem at.
itemRibbonBarItemThe RibbonBarItem to insert in the collection.

The Parent of the item is set to the RibbonBarGroup that owns this collection.

Example:

Inserting a RibbonBarItem at a specific position:

this.ribbonBarGroup1.Items.Insert(0, new RibbonBarItemButton { Name = "paste", Text = "Paste" });