Skip to main content

ImageComboBoxItem.ImageIndex Property

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

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(-1)]
[DXCategory("Appearance")]
[ImageList("Images")]
public int ImageIndex { get; set; }

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