BarItemLinkCollection.Insert(BarItemLink, BarItem) Method
Creates a new link to the specified bar item and adds it before the specified link in the collection.
Namespace: DevExpress.XtraBars
Assembly: DevExpress.XtraBars.v18.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
beforeLink | BarItemLink | A BarItemLink object representing an item link before which the new link is inserted. |
item | BarItem | A BarItem descendant for which the link is created and added to the collection. |
Returns
Type | Description |
---|---|
BarItemLink | A BarItemLink object representing the link inserted. |
Remarks
The Insert method inserts a new link before the specified one by moving all the following links to the end of the collection. If the collection does not contain a beforeLink, the link is appended to the end.
Note: 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.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Insert(BarItemLink, 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.