System.Windows.Forms.ImageList Class

Provides methods to manage a collection of System.Drawing.Image objects. This class cannot be inherited.

See Also: ImageList Members

Syntax

[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.ImageListConverter))]
[System.ComponentModel.ToolboxItemFilter("System.Windows.Forms")]
[System.ComponentModel.Design.Serialization.DesignerSerializer("System.Windows.Forms.Design.ImageListCodeDomSerializer, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[System.ComponentModel.Designer("System.Windows.Forms.Design.ImageListDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[System.ComponentModel.DefaultProperty("Images")]
public sealed class ImageList : System.ComponentModel.Component

Remarks

System.Windows.Forms.ImageList is typically used by other controls, such as the System.Windows.Forms.ListView, System.Windows.Forms.TreeView, or System.Windows.Forms.ToolBar. You can add bitmaps or icons to the System.Windows.Forms.ImageList, and the other controls are able to use the images as they require.

System.Windows.Forms.ImageList uses a handle to manage the list of images. The ImageList.Handle is not created until certain operations, such as getting the ImageList.Handle or calling ImageList.Draw(System.Drawing.Graphics, System.Drawing.Point, int), are performed on the image list. Performing other operations, such as setting the ImageList.ColorDepth or ImageList.ImageSize will cause the ImageList.Handle to be recreated. Therefore, you should perform these operations before you add images to the System.Windows.Forms.ImageList. In addition, when you work with forms that will be localized, you should always add an System.Windows.Forms.ImageList and images when the Language property of a form is set to Default. Changing the form's language before you add images will corrupt the application resource files.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0