InsertBarItemAction Class
Inserts a bar item at a specific position within the BarManager.Items collection.
Namespace: DevExpress.Xpf.Bars
Assembly: DevExpress.Xpf.Core.v24.2.dll
NuGet Package: DevExpress.Wpf.Core
Declaration
Remarks
This action inserts InsertBarItemAction.Item at a specific position (InsertBarItemAction.ItemIndex) within the BarManager.Items collection.
The InsertBarItemAction object can be used as follows:
<dxb:InsertBarItemAction ItemIndex="0">
<dxb:InsertBarItemAction.Item>
<dxb:BarButtonItem x:Name="myButton" Content="My Button" ItemClick="myButton_ItemClick"/>
</dxb:InsertBarItemAction.Item>
</dxb:InsertBarItemAction>
The InsertBarItemAction.ItemIndex property is an attached property. It can be set for a BarItem object when the bar item acts as an action:
<!--Create a bar item adding it at the first position in the BarManager.Items collection and display the item in the barStatusBar-->
<dxb:BarManagerActionContainer>
<dxb:BarButtonItem x:Name="myButton2" Content="My Button 2"
dxb:InsertBarItemAction.ItemIndex="0"
dxb:InsertBarItemLinkAction.Target="barStatusBar"
ItemClick="myButton2_ItemClick"/>
<!--...-->
</dxb:BarManagerActionContainer>
See Bar Actions to learn more.
Implements
Inheritance
See Also