System.Windows.Forms.ListViewItem.StateImageIndex Property

Gets or sets the index of the state image (an image such as a selected or cleared check box that indicates the state of the item) that is displayed for the item.

Syntax

[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.NoneExcludedImageIndexConverter))]
[System.Windows.Forms.RelatedImageList("ListView.StateImageList")]
[System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)]
[System.ComponentModel.Localizable(true)]
[System.ComponentModel.Editor("System.Windows.Forms.Design.ImageIndexEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))]
[System.ComponentModel.DefaultValue(-1)]
public int StateImageIndex { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

This property allows you to specify the index into the System.Windows.Forms.ImageList assigned to the ListView.StateImageList property of the associated System.Windows.Forms.ListView control, where the state images to display to the left of the item are stored. Typically, the state image is a selected or cleared check box or an image that is intended to represent selected or cleared states for the item. If no value is specified for the ListView.StateImageList property, the System.Windows.Forms.ListView control displays a default selected or cleared check box when the ListView.CheckBoxes property of the control is set to true.

Note:

Although the System.Windows.Forms.ImageList specified in the ListView.StateImageList property can contain any number of images, and the ListViewItem.StateImageIndex property can be set to any value equal to or lower than 14, only the images at index positions 0 and 1 are displayed as state images.

Requirements

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