FlexChart | ComponentOne
C1.Win.Ribbon.8 Assembly / C1.Win.Ribbon Namespace / C1Ribbon Class / GetPresetImage Method / GetPresetImage(String,Int32,Boolean) Method
The icon key.
The icon size
Determines whether the icons are dark or not.

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

    Parameters

    key
    The icon key.
    size
    The icon size
    isDarkTheme
    Determines whether the icons are dark or not.

    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