Skip to main content

ICollectionItem.SetCollection(Collection) Method

When implemented by a class assigns the item’s owning collection.

Namespace: DevExpress.XtraNavBar

Assembly: DevExpress.XtraNavBar.v24.1.dll

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

Declaration

void SetCollection(
    Collection newCollection
)

Parameters

Name Type Description
newCollection Collection

An object supporting the System.Collections.ICollection interface representing the collection to which the item belongs.

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 SetCollection method is called in order to assign the owning collection. The assigned value must then be returned by the ICollectionItem.Collection property.

When an item is being removed from the collection, null (Nothing in Visual Basic) is transmitted via the SetCollection method. This means that the item doesn’t belong to a collection any longer.

See Also