Skip to main content
A newer version of this page is available. .
Bar

BarItemLink.OwnerItem Property

Gets a link’s owner item.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v18.2.dll

Declaration

[Browsable(false)]
public virtual BarItem OwnerItem { get; }

Property Value

Type Description
BarItem

A BarItem descendant representing an item that owns the link. null (Nothing in Visual Basic) if the link doesn’t belong to any item.

Remarks

Use the OwnerItem property to get the container item (a BarCustomContainerItem descendant) that owns the current link. All links owned by the container item are stored in the item’s link collection represented by the BarCustomContainerItem.ItemLinks property. If the container is not an item (not a BarItem descendant), the OwnerItem property returns a null reference. For example, this can take place if the link is displayed within a bar.

If it is necessary to obtain an object that contains the link, use the BarItemLink.LinkedObject property. To access the link’s corresponding item, use the BarItemLink.Item property.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the OwnerItem property.

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