ImageListBoxItem.ImageIndex Property

Specifies the index of the item's image.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v20.1.dll

Declaration

[Browsable(false)]
[DefaultValue(-1)]
[ImageList("Images")]
[DXCategory("Appearance")]
public virtual int ImageIndex { get; set; }
<Browsable(False)>
<DefaultValue(-1)>
<ImageList("Images")>
<DXCategory("Appearance")>
Public Overridable Property ImageIndex As Integer

Property Value

Type Default Description
Int32

-1

An integer value representing the zero-based index of the item's image.

Remarks

To assign images to items, first set the BaseImageListBoxControl.ImageList property to a list of images. Then, use the ImageIndex property to assign the index of a specific image from this list to an item.

To get the index of the image displayed in the specified item, use the BaseImageListBoxControl.GetItemImageIndex method.

Note: when the data source is bound to the ImageListBoxControl, you must specify the data source field whose contents represent image indexes. Use the BaseImageListBoxControl.ImageIndexMember property for this purpose. Otherwise, images cannot be displayed.

See Also