ImageComboBoxItemCollection.Add(ImageComboBoxItem) Method
Adds a new item to the current collection.
Namespace: DevExpress.XtraEditors.Controls
Assembly: DevExpress.XtraEditors.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Parameters
Name | Type | Description |
---|---|---|
item | ImageComboBoxItem | A new item to insert into the collection. |
Returns
Type | Description |
---|---|
Int32 | The position into which the new element was inserted. |
Remarks
The Add method allows you to add a new element to the collection. The new element to insert is identified by the item parameter. This represents an instance of the ImageComboBoxItem class and describes the item’s value, caption and image index. You can also customize the item at a later time by accessing it using the ImageComboBoxItemCollection.Item indexer.
To add an array of items at once, use the ImageComboBoxItemCollection.AddRange method instead.
Note: To ensure proper functionality of the ImageComboBoxEdit control, item values must be unique within the collection.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Add(ImageComboBoxItem) method.
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.