Gets a System.Drawing.Bitmap of the small icon that is associated with an item and specified by an identifier or a Scalable Vector Graphics (SVG) stream parameter. The identifier can be the string conversion of an enumeration that is associated with an item (such as RibbonFormattingTab.RibbonItem.TXITEM_Paste). The size of the returned small icon depends on the resolution that is specified by the dpi parameter or the resolution of a specific control. The source of the small image is based on a grid of 16x16 Pixel and a resolution of 96 dpi.

GetSmallIcon(String, Float)

public static System.Drawing.Bitmap GetSmallIcon(string identifier, float dpi);

GetSmallIcon(String, Float, Windows.Forms.ResourceProvider.ImageSourceSettings)

public static System.Drawing.Bitmap GetSmallIcon(string identifier, float dpi, Windows.Forms.ResourceProvider.ImageSourceSettings settings);

GetSmallIcon(System.IO.Stream, Float)

public static System.Drawing.Bitmap GetSmallIcon(System.IO.Stream stream, float dpi);

GetSmallIcon(String, System.Windows.Forms.Control)

public static System.Drawing.Bitmap GetSmallIcon(string identifier, System.Windows.Forms.Control control);

GetSmallIcon(String, System.Windows.Forms.Control, Windows.Forms.ResourceProvider.ImageSourceSettings)

public static System.Drawing.Bitmap GetSmallIcon(string identifier, System.Windows.Forms.Control control, Windows.Forms.ResourceProvider.ImageSourceSettings settings);

GetSmallIcon(System.IO.Stream, System.Windows.Forms.Control)

public static System.Drawing.Bitmap GetSmallIcon(System.IO.Stream stream, System.Windows.Forms.Control control);

Parameters

Parameter Description
identifier The identifier of the item that is associated with the requested small icon.
dpi Specifies the resolution that is used to create the requested small icon.
settings Specifies an ImageSourceSettings object with additional settings for receiving the small image.
control Specifies the control from where the resolution is determined that is used to create the requested small icon.
stream Specifies the Scalable Vector Graphics (SVG) stream that is used to create the requested small icon.

Return Value

A bitmap of the small icon that is assigned to the item. If no small icon is associated with the item, the method returns null.

Remarks

An exception is thrown if the handle of the specified control parameter is not created.

Further Reading

Learn more about the TXTextControl.Windows.Forms.ResourceProvider.GetSmallIcon Method in the Text Control Blog: