Skip to main content

GalleryItemCollection.IndexOf(GalleryItem) Method

Returns the specified item’s position within the collection.

Namespace: DevExpress.XtraBars.Ribbon

Assembly: DevExpress.XtraBars.v24.2.dll

Declaration

public int IndexOf(
    GalleryItem item
)

Parameters

Name Type Description
item GalleryItem

A GalleryItem object to locate in the collection.

Returns

Type Description
Int32

A zero-based integer representing the item’s position within the collection. -1 if the collection does not contain the specified item.

Remarks

This method scans the collection starting at the first element and returns the index of the first matching element found.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the IndexOf(GalleryItem) 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.

See Also