System.Windows.Forms.ImageList.ImageSize Property

Gets or sets the size of the images in the image list.

Syntax

[System.ComponentModel.Localizable(true)]
public System.Drawing.Size ImageSize { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Setting the ImageList.ImageSize property prior to adding images to the image collection causes the images to be resized to the image size specified.

When you set the ImageList.ImageSize property to a new value, the ImageList.Handle for the image list is recreated.

Because setting the ImageList.ImageSize property causes the handle to be recreated, you should set ImageList.ImageSize prior to setting the ImageList.Images property. When the handle for the System.Windows.Forms.ImageList has been created, setting the ImageList.ColorDepth or ImageList.ImageSize properties in code, after setting the ImageList.Images property, will cause the collection of images set for the ImageList.Images property to be deleted.

Requirements

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