FlexChart | ComponentOne
C1.Win.Ribbon.4.5.2 Assembly / C1.Win.Ribbon Namespace / RibbonItemCollection Class / Item Property / Item(String) Property
String containing the name of the item to locate (case-sensitive).
Example

In This Topic
    Item(String) Property
    In This Topic
    Gets the first RibbonItem with the specified name.
    Syntax
    'Declaration
     
    Public Overloads ReadOnly Property Item( _
       ByVal name As System.String _
    ) As RibbonItem
    public RibbonItem Item( 
       System.string name
    ) {get;}

    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