Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ImageComboBoxItem.ImageIndex Property

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

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v24.2.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