[]
Gets or sets the RibbonGalleryItem at the specified position in the collection.
public RibbonGalleryItem this[int index] { get; set; }
Type | Name | Description |
---|---|---|
int | index | Index of the item. |
Type | Description |
---|---|
RibbonGalleryItem | The RibbonGalleryItem at the specified |
Gets the first RibbonGalleryItem with the specified name.
public RibbonGalleryItem this[string name] { get; }
Type | Name | Description |
---|---|---|
string | name | String containing the name of the item to locate (case-sensitive). |
Type | Description |
---|---|
RibbonGalleryItem | The RibbonGalleryItem with the specified |
If an item with the specified name
is not found,
an ArgumentOutOfRangeException exception is thrown.
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"];