Back to Devexpress

InsertBarItemLinkAction Class

wpf-devexpress-dot-xpf-dot-bars-5ec0ea41.md

latest4.0 KB
Original Source

InsertBarItemLinkAction Class

Inserts a bar item link to the item link collection of a target object (a bar, a menu, etc.).

Namespace : DevExpress.Xpf.Bars

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
[Browsable(false)]
public class InsertBarItemLinkAction :
    BarItemLinkActionBase
vb
<Browsable(False)>
Public Class InsertBarItemLinkAction
    Inherits BarItemLinkActionBase

Remarks

The InsertBarItemLinkAction object inserts InsertBarItemLinkAction.ItemLink at a specific position (BarItemLinkActionBase.ItemLinkIndex) within a target object (the target object is addressed by either the BarItemLinkActionBase.Target or BarItemLinkActionBase.TargetType property).

The following code adds a link to the btnAbout item at the first position within the barFormat bar:

xaml
<dxb:InsertBarItemLinkAction Target="barFormat" ItemLinkIndex="0">
    <dxb:InsertBarItemLinkAction.ItemLink>
        <dxb:BarButtonItemLink BarItemName="btnAbout"/>
    </dxb:InsertBarItemLinkAction.ItemLink>
</dxb:InsertBarItemLinkAction>

The inherited BarItemLinkActionBase.ItemLinkIndex, BarItemLinkActionBase.Target and BarItemLinkActionBase.TargetType properties are attached properties. They can be set for BarItem and BarItemLink descendants when these act as actions (when they are added to the BarManagerActionContainer.Actions collection):

xaml
<!--Create a bar item and display a link to this item at the first position in the barFormat bar-->
<dxb:BarManagerActionContainer>
    <dxb:BarButtonItem x:Name="myButton2" Content="My Button 2" 
                       dxb:InsertBarItemLinkAction.ItemLinkIndex="0" 
                       dxb:InsertBarItemLinkAction.Target="barFormat"
                       ItemClick="myButton2_ItemClick"/>
    <!--...-->
</dxb:BarManagerActionContainer>

See Bar Actions to learn more.

Implements

IControllerAction

Inheritance

Show 11 items

Object DispatcherObject DependencyObject ContentElement FrameworkContentElement DXFrameworkContentElement BarManagerControllerActionBase BarItemLinkActionBase InsertBarItemLinkAction AddBarItemLinkAction

SetBarItemLinkAction

See Also

InsertBarItemLinkAction Members

Bar Actions

DevExpress.Xpf.Bars Namespace