Skip to main content

ICollectionItem.Collection Property

When implemented by a class, gets the collection to which an item belongs.

Namespace: DevExpress.XtraNavBar

Assembly: DevExpress.XtraNavBar.v23.2.dll

NuGet Packages: DevExpress.Win, DevExpress.Win.Navigation

Declaration

Collection Collection { get; }

Property Value

Type Description
Collection

An object supporting the System.Collections.ICollection interface representing the collection which owns an item. null (Nothing in Visual Basic) if the item doesn’t belong to the collection.

Remarks

The base class for collection objects used in the NavBarControl is represented by the Collection class. When an item is added to the collection, the item’s ICollectionItem.SetCollection method is called in order to assign the collection to which it belongs. The assigned value must then be returned by the Collection property.

When an item is being removed from the collection, null (Nothing in Visual Basic) is transmitted via the ICollectionItem.SetCollection method.

See Also