FlexChart | ComponentOne
C1.Win.Ribbon.4.8 Assembly / C1.Win.Ribbon Namespace / C1Ribbon Class / GetPresetImage Method / GetPresetImage(String,Int32) Method
The icon key.
The icon size

In This Topic
    GetPresetImage(String,Int32) Method
    In This Topic
    Returns a bitmap image from build-in C1Ribbon presets for the current theme lightness.
    Syntax
    'Declaration
     
    Public Overloads Function GetPresetImage( _
       ByVal key As System.String, _
       ByVal size As System.Integer _
    ) As System.Drawing.Image
    public System.Drawing.Image GetPresetImage( 
       System.string key,
       System.int size
    )

    Parameters

    key
    The icon key.
    size
    The icon size

    Return Value

    The bitmap image from build-in C1Ribbon preset. If image with specified key is not found, returns null. If image with specified size is not found, returns the most appropriate image resized to the specified size.
    Remarks
    You have item with a icon from build-in preset: ribbonButton1.IconSet.Add(new C1.Framework.C1BitmapIcon("Book", new System.Drawing.Size(32, 32), System.Drawing.Color.Transparent, "Preset_LargeImages", 22)); You can get this image: var bookImage = c1ribbon.GetPressetImage(ribbonButton1.IconSet[1].Key, 32); The C1Ribbon contains 16px, 20px and 32px build-in presets.
    See Also