Skip to main content

ListBoxItemCollection.Count Property

Gets the number of items in the collection.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public int Count { get; }

Property Value

Type Description
Int32

An integer value that specifies the number of items in the collection.

Remarks

When a list box control is bound to a data source via the BaseListBoxControl.DataSource property, its Items collection doesn’t provide access to the data source’s items. So, the Items.Count property doesn’t allow you to get the number of items in the data source. To get the number of items, use the BaseListBoxControl.ItemCount property instead. When the list box control is not bound to a data source, the Items.Count and BaseListBoxControl.ItemCount properties are in sync.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Count 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