Back to Devexpress

BarItemLinkActionBase.SetItemLinkIndex(DependencyObject, Int32) Method

wpf-devexpress-dot-xpf-dot-bars-dot-baritemlinkactionbase-dot-setitemlinkindex-x28-system-dot-windows-dot-dependencyobject-system-dot-int32-x29.md

latest3.2 KB
Original Source

BarItemLinkActionBase.SetItemLinkIndex(DependencyObject, Int32) Method

Sets the value of the BarItemLinkActionBase.ItemLinkIndex attached property for the specified object.

Namespace : DevExpress.Xpf.Bars

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public static void SetItemLinkIndex(
    DependencyObject d,
    int value
)
vb
Public Shared Sub SetItemLinkIndex(
    d As DependencyObject,
    value As Integer
)

Parameters

NameTypeDescription
dDependencyObject

An object whose ItemLinkIndex property is to be set.

| | value | Int32 |

A integer value that is the index of the current bar item link in the collection of bar item links.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SetItemLinkIndex(DependencyObject, Int32) 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.

wpf-dock-layout-manager-use-events-to-dynamically-customize-context-menus/CS/DockManager_MenuCustomization/Window1.xaml.cs#L33

csharp
// Specify the position for the button via the InsertBarItemLinkAction.ItemLinkIndex attached property.
InsertBarItemLinkAction.SetItemLinkIndex(actionAddAboutItem, 0);
actionAddAboutItem.Content = "About...";

wpf-dock-layout-manager-use-events-to-dynamically-customize-context-menus/VB/DockManager_MenuCustomization/Window1.xaml.vb#L25

vb
' Specify the position for the button via the InsertBarItemLinkAction.ItemLinkIndex attached property.
BarItemLinkActionBase.SetItemLinkIndex(actionAddAboutItem, 0)
actionAddAboutItem.Content = "About..."

See Also

BarItemLinkActionBase Class

BarItemLinkActionBase Members

DevExpress.Xpf.Bars Namespace