Ribbon for WinForms | ComponentOne
C1.Win.Ribbon Namespace / RibbonGalleryItemCollection 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 RibbonGalleryItem with the specified name.
    Syntax
    'Declaration
     
    
    Public Overloads ReadOnly Property Item( _
       ByVal name As String _
    ) As RibbonGalleryItem
    public RibbonGalleryItem Item( 
       string name
    ) {get;}

    Parameters

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

    Property Value

    The RibbonGalleryItem with the specified name.
    Remarks

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

    Example
    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"];
    See Also