Bar

InsertBarAction Class

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

Namespace: DevExpress.Xpf.Bars

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

Declaration

[Browsable(false)]
public class InsertBarAction :
    BarManagerControllerActionBase
<Browsable(False)>
Public Class InsertBarAction
    Inherits 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