C1.Win.C1Ribbon.4.8 Assembly / C1.Win.C1Ribbon Namespace / RibbonItemCollection Class / Item Property / Item(String) Property
String containing the name of the item to locate (case-sensitive).
Example

Item(String) Property
Gets the first RibbonItem with the specified name.
Syntax
'Declaration
 
Public Overloads ReadOnly Property Item( _
   ByVal name As System.String _
) As RibbonItem
 

Parameters

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

Property Value

The RibbonItem with the specified name.
Remarks

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

This method can be used to retrieve RibbonItem objects that are contained in RibbonToolBar objects, and are not direct members of the collection.

Example
The example below shows how to get a reference to a RibbonItem using its name:
// get the group that contains the button
RibbonGroup g = c1Ribbon1.Tabs["Editor"].Groups["Font"];
            
// get the button within the group
RibbonToggleButton btn = (RibbonToggleButton)g.Items["BoldButton"];
See Also