Skip to main content
A newer version of this page is available. .

ImageComboBoxItem.ImageIndex Property

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

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v19.1.dll

Declaration

[DefaultValue(-1)]
[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

The following code snippets (auto-collected from DevExpress Examples) contain references to the ImageIndex property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also