System.Windows.Forms.ColumnHeader.ImageIndex Property

Gets or sets the index of the image displayed in the System.Windows.Forms.ColumnHeader.

Syntax

[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.ImageIndexConverter))]
[System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)]
[System.ComponentModel.Editor("System.Windows.Forms.Design.ImageIndexEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[System.ComponentModel.DefaultValue(-1)]
public int ImageIndex { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

The ColumnHeader.ImageIndex property refers to the index of an image specified by the ListView.SmallImageList property of the System.Windows.Forms.ListView that contains the System.Windows.Forms.ColumnHeader. The ColumnHeader.ImageIndex property returns -1 if there is no ListView.SmallImageList set on the containing System.Windows.Forms.ListView. The image displayed in a column is typically used to indicate the state of items in the column.

ColumnHeader.ImageKey and ColumnHeader.ImageIndex are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored.

The image associated with a System.Windows.Forms.ColumnHeader is typically used to indicate the state information. If you set the ColumnHeader.ImageIndex to a value greater than the index of the last item in the associated image list, ColumnHeader.ImageIndex will be set to the index of the last item in the image list.

Requirements

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