Skip to main content
Bar

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

BarItems.Add(BarItem) Method

Adds the specified item to the end of the collection.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

public virtual int Add(
    BarItem item
)

#Parameters

Name Type Description
item BarItem

A BarItem descendant representing the item to be added.

#Returns

Type Description
Int32

A zero-based integer value representing the index of the item added.

#Remarks

The Add method adds the specified item to the BarManager’s item collection and returns its position within the collection. If the item is already contained within the collection, this method returns the item’s index within the collection.

To add several items at once, use the BarItems.AddRange method.

See Also