Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ICollectionItem.SetCollection(Collection) Method

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

Namespace: DevExpress.XtraNavBar

Assembly: DevExpress.XtraNavBar.v24.2.dll

NuGet Package: DevExpress.Win

#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