Skip to main content
Bar

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

InsertBarAction Class

Inserts a bar at a specific position within the BarManager.Bars collection.

Namespace: DevExpress.Xpf.Bars

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

NuGet Package: DevExpress.Wpf.Core

#Declaration

[Browsable(false)]
public class InsertBarAction :
    BarManagerControllerActionBase

#Remarks

This action inserts InsertBarAction.Bar at a specific position (InsertBarAction.BarIndex) within the BarManager.Bars collection.

The InsertBarAction object can be used as follows:

<dxb:InsertBarAction BarIndex="3">
    <dxb:InsertBarAction.Bar>
        <dxb:Bar x:Name="myBar">
            <dxb:Bar.DockInfo>
                <dxb:BarDockInfo ContainerType="Left"/>
            </dxb:Bar.DockInfo>
        </dxb:Bar>
    </dxb:InsertBarAction.Bar>
</dxb:InsertBarAction>

The InsertBarAction.BarIndex property is an attached property. It can be set for a Bar object when the bar acts as an action:

<!--Create a bar and add it at the first position in the BarManager.Bars collection-->
<dxb:BarManagerActionContainer>
    <dxb:Bar x:Name="barStatusBar" dxb:InsertBarAction.BarIndex="0">
        <dxb:Bar.DockInfo>
            <dxb:BarDockInfo ContainerType="Bottom"/>
        </dxb:Bar.DockInfo>
    </dxb:Bar>
    <!--...-->
</dxb:BarManagerActionContainer>

See Bar Actions to learn more.

#Implements

See Also