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

BarItemLinkActionBase.ItemLinkIndex Attached Property

Gets or sets the index of the current bar item link in the collection of bar item links in the Target object. This is an attached property, which is in effect for BarItem and BarItemLink descendants when they act as actions (when they are added to the BarManagerActionContainer.Actions collection).

Namespace: DevExpress.Xpf.Bars

Assembly: DevExpress.Xpf.Core.v19.1.dll

Declaration

Returns

Type Description
Int32

An integer value that specifies the index of the current bar item link in the collection of bar item links in the Target object.

Example

The following example demonstrates how to add a custom menu item to the context menu of a grid column. For this, it is necessary to add a corresponding bar item (e.g. BarCheckItem) to the DataViewBase.ColumnMenuCustomizations collection, and specify different item properties. Also, you can insert this item into a specific position by attaching the BarItemLinkActionBase.ItemLinkIndex property to it.

<dxg:TableView.ColumnMenuCustomizations>
    <dxb:BarCheckItem Name="checkItem1" Content="Checked" IsChecked="True" dxb:BarItemLinkActionBase.ItemLinkIndex="0" />
    <dxb:BarItemLinkSeparator dxb:BarItemLinkActionBase.ItemLinkIndex="1" />
</dxg:TableView.ColumnMenuCustomizations>

The following code snippets (auto-collected from DevExpress Examples) contain references to the ItemLinkIndex attachedproperty.

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