Skip to main content
Bar

BarItemLinkCollection.Add(BarItem) Method

Creates a link to the specified bar item and adds it to the end of the collection.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v24.2.dll

Declaration

public virtual BarItemLink Add(
    BarItem item
)

Parameters

Name Type Description
item BarItem

A BarItem descendant, for which a link is added to the collection.

Returns

Type Description
BarItemLink

A BarItemLink object representing the link added.

Remarks

A bar item must belong to the BarManager’s BarManager.Items collection so that a link to it can be created and added to the collection. Otherwise, an exception will be raised.

To add several links to different bar items at once, see the BarItemLinkCollection.AddRange method.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Add(BarItem) method.

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