Back to Devexpress

InsertBarAction Class

wpf-devexpress-dot-xpf-dot-bars-2492c0b9.md

latest3.3 KB
Original Source

InsertBarAction Class

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

Namespace : DevExpress.Xpf.Bars

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
[Browsable(false)]
public class InsertBarAction :
    BarManagerControllerActionBase
vb
<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:

xaml
<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:

xaml
<!--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

IControllerAction

Inheritance

Show 12 items

Object DispatcherObject DependencyObject ContentElement FrameworkContentElement DXFrameworkContentElement BarManagerControllerActionBase InsertBarAction AddBarAction

InsertMainMenuIfNotExistAction

InsertStatusBarIfNotExistAction

SetBarAction

See Also

InsertBarAction Members

Bar Actions

DevExpress.Xpf.Bars Namespace