[]
Returns a bitmap image from build-in C1Ribbon presets for the current theme lightness.
public Image GetPresetImage(string key, int size)
Type | Name | Description |
---|---|---|
string | key | The icon key. |
int | size | The icon size |
Type | Description |
---|---|
Image | 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. |
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.
Returns a bitmap image from build-in C1Ribbon presets.
public Image GetPresetImage(string key, int size, bool isDarkTheme)
Type | Name | Description |
---|---|---|
string | key | The icon key. |
int | size | The icon size |
bool | isDarkTheme | Determines whether the icons are dark or not. |
Type | Description |
---|---|
Image | 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. |
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.