ImageComboBoxItem.ImageIndex Property

Gets or sets the index of the image associated with the item.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v20.1.dll

Declaration

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

Property Value

Type Default Description
Int32

-1

The index of the image associated with the item.

Remarks

Each item for an ImageComboBoxEdit control can be associated with a large and/or small image. Large images are stored in the RepositoryItemImageComboBox.LargeImages list and small images are stored in the RepositoryItemImageComboBox.SmallImages list. The ImageIndex property specifies the index of an image in these lists.

If both RepositoryItemImageComboBox.LargeImages and RepositoryItemImageComboBox.SmallImages properties contain images, the editor displays an item with a small image in the edit box and a large image in the dropdown. If only one of these lists is assigned, the editor uses images from the corresponding list to display items both in the edit box and the dropdown. If none of these properties are assigned, items are represented only by their captions. See the ImageComboBoxItem.Description property to set the item's caption

See Also