[]
        
(Showing Draft Content)

C1.Win.Ribbon.RibbonGalleryItemCollection.Item

this Property

this[int]

Gets or sets the RibbonGalleryItem at the specified position in the collection.

Declaration
public RibbonGalleryItem this[int index] { get; set; }
Parameters
Type Name Description
int index

Index of the item.

Property Value
Type Description
RibbonGalleryItem

The RibbonGalleryItem at the specified index.

this[string]

Gets the first RibbonGalleryItem with the specified name.

Declaration
public RibbonGalleryItem this[string name] { get; }
Parameters
Type Name Description
string name

String containing the name of the item to locate (case-sensitive).

Property Value
Type Description
RibbonGalleryItem

The RibbonGalleryItem with the specified name.

Remarks

If an item with the specified name is not found, an ArgumentOutOfRangeException exception is thrown.

Examples

The example below shows how to get a reference to a RibbonGalleryItem using its name:

// get the group that contains the button
RibbonGroup g = c1Ribbon1.Tabs["Editor"].Groups["Font"];

// get the RibbonGallery within the group
RibbonGallery gallery = (RibbonGallery)g.Items["Gallery"];