ColumnHeader::ImageIndex Property
Gets or sets the index of the image displayed in the ColumnHeader.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
public: [TypeConverterAttribute((ImageIndexConverter^::typeid))] property int ImageIndex { int get(); void set(int value); }
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | ImageIndex is less than -1. |
The ImageIndex property refers to the index of an image specified by the SmallImageList property of the ListView that contains the ColumnHeader. The ImageIndex property returns -1 if there is no SmallImageList set on the containing ListView. The image displayed in a column is typically used to indicate the state of items in the column.
ImageKey and ImageIndex are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored.
The image associated with a ColumnHeader is typically used to indicate the state information. If you set the ImageIndex to a value greater than the index of the last item in the associated image list, ImageIndex will be set to the index of the last item in the image list.
Available since 2.0