Icons Class

Provides some icon-related methods as well as properties returning general icons in multi resolution. Unlike SystemIcons, these icons should be disposed when not used any more.

Definition

Namespace: KGySoft.Drawing
Assembly: KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 7.0.0
C#
public static class Icons
Inheritance
Object    Icons

Remarks

  Note

When targeting .NET 7.0 or later versions this class is supported on Windows only.

Properties

ApplicationApplication (small version for the summary) Gets the Application icon displaying a window (Sizes: 256x256, 64x64, 48x48, 32x32, 24x24, 16x16)
ErrorError (small version for the summary) Gets the Error icon displaying a white "X" in a red circle (Sizes: 256x256, 64x64, 48x48, 32x32, 24x24, 20x20, 16x16)
InformationInformation (small version for the summary) Gets the Information icon displaying a white "i" a blue circle (Sizes: 256x256, 64x64, 48x48, 32x32, 24x24, 20x20, 16x16)
QuestionQuestion (small version for the summary) Gets the Question icon displaying a white "?" in a blue circle (Sizes: 256x256, 64x64, 48x48, 32x32, 24x24, 20x20, 16x16)
SecurityErrorSecurity Error (small version for the summary) Gets the Security Error icon displaying a red shield with a white "X" (Sizes: 256x256, 48x48, 32x32, 24x24, 16x16)
SecurityQuestionSecurity Question (small version for the summary) Gets the Security Question icon displaying a blue shield with a white "?" (Sizes: 256x256, 48x48, 32x32, 24x24, 16x16)
SecurityShieldSecurity Shield (small version for the summary) Gets the Security Shield icon displaying a blue-yellow shield (Sizes: 256x256, 128x128, 48x48, 32x32, 24x24, 16x16, 8x8)
SecuritySuccessSecurity Success (small version for the summary) Gets the Security Success icon displaying a green shield with a white check (Sizes: 256x256, 48x48, 32x32, 24x24, 16x16)
SecurityWarningSecurity Warning (small version for the summary) Gets the Security Warning icon displaying a yellow shield with a black "!" (Sizes: 256x256, 48x48, 32x32, 24x24, 16x16)
ShieldShield (small version for the summary) Gets the Windows Shield icon displaying a red-green-blue-yellow shield (Sizes: 256x256, 128x128, 48x48, 32x32, 24x24, 16x16, 8x8)
SystemApplicationApplication (small version for the summary) Gets an Icon instance that contains a large and a small Application icon as it is displayed by the current operating system.
In Windows Vista and above sizes are depending on current DPI settings, in Windows XP and Linux the icon has always 32x32 and 16x16 image sizes.
SystemErrorError (small version for the summary) Gets an Icon instance that contains a large and a small Error icon as it is displayed by the current operating system.
In Windows Vista and above sizes are depending on current DPI settings, in Windows XP and Linux the icon has always 32x32 and 16x16 image sizes.
SystemInformationInformation (small version for the summary) Gets an Icon instance that contains a large and a small Information icon as it is displayed by the current operating system.
In Windows Vista and above sizes are depending on current DPI settings, in Windows XP and Linux the icon has always 32x32 and 16x16 image sizes.
SystemQuestionQuestion (small version for the summary) Gets an Icon instance that contains a large and a small Question icon as it is displayed by the current operating system.
In Windows Vista and above sizes are depending on current DPI settings, in Windows XP and Linux the icon has always 32x32 and 16x16 image sizes.
SystemShieldShield (small version for the summary) Gets an Icon instance that contains the Shield icon as it is displayed by the current operating system.
In Windows Vista and above sizes are depending on current DPI settings, in Windows XP the icon has always 48x48, 32x32 and 16x16 image sizes in three different color depths and in Linux (Mono) the icon contains a 29x32 and a 16x16 image.
SystemWarningWarning (small version for the summary) Gets an Icon instance that contains a large and a small Warning icon as it is displayed by the current operating system.
In Windows Vista and above sizes are depending on current DPI settings, in Windows XP and Linux the icon has always 32x32 and 16x16 image sizes.
WarningWarning (small version for the summary) Gets the Warning icon displaying a black "!" in a yellow triangle (Sizes: 256x256, 64x64, 48x48, 32x32, 24x24, 20x20, 16x16)

Methods

Combine(Bitmap) Combines the provided images into a multi-resolution Icon instance.
Combine(Icon) Combines the provided icons into a multi-resolution Icon instance.
Combine(IEnumerableBitmap) Combines the provided images into a multi-resolution Icon instance.
Combine(IEnumerableIcon) Combines the provided icons into a multi-resolution Icon instance.
Combine(Bitmap, Color) Combines the provided images into a multi-resolution Icon instance.
Combine(Boolean, IEnumerableBitmap) Combines the provided images into a multi-resolution Icon instance.
Combine(Boolean, IEnumerableIcon) Combines the provided icons into a multi-resolution Icon instance.
Combine(Boolean, Bitmap) Combines the provided images into a multi-resolution Icon instance.
Combine(Boolean, Icon) Combines the provided icons into a multi-resolution Icon instance.
Combine(Bitmap, Color, Boolean) Combines the provided images into a multi-resolution Icon instance.
FromExtension Gets the system-associated icon of a file or an extension.
FromFile(String) Extracts dual-resolution icons from a file and returns them as separated Icon instances.
FromFile(String, SystemIconSize) Extracts icons of the specified size from a file and returns them as separated Icon instances.
FromStream(Stream) Loads an Icon from the specified stream.
FromStream(Stream, Boolean) Loads an Icon from the specified stream.
GetStockIcon Tries to get a system stock icon. When there is no icon defined for provided id, or Windows version is below Vista, this method returns . In Windows XP use the predefined property members to retrieve system icons.

See Also