Skip to main content

SpreadsheetControl.StatusBarActions Property

Provides access to the collection of actions used to customize the Spreadsheet control’s status bar

Namespace: DevExpress.Xpf.Spreadsheet

Assembly: DevExpress.Xpf.Spreadsheet.v24.1.dll

NuGet Package: DevExpress.Wpf.Spreadsheet

Declaration

public ObservableCollection<IControllerAction> StatusBarActions { get; }

Property Value

Type Description
ObservableCollection<IControllerAction>

A collection of customization actions.

Remarks

Add customization actions to the StatusBarActions collection to modify the Spreadsheet control’s status bar. You can add new elements to the status bar or remove its predefined items.

The example below shows how to add a custom File Name item to the status bar and remove the predefined Min and Max items.

Spreadsheet_Customize_Status_Bar

<!--Add the following namespace declarations:
xmlns:dxsps="http://schemas.devexpress.com/winfx/2008/xaml/spreadsheet"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"-->

<dxsps:SpreadsheetControl x:Name="spreadsheetControl" 
                                  CommandBarStyle="Ribbon" 
                                  ShowFormulaBar="True" 
                                  ShowStatusBar="True" >
    <dxsps:SpreadsheetControl.StatusBarActions>
        <!--Remove the MIN and MAX items from the status bar.-->
        <dxb:RemoveAction ElementName="{x:Static dxsps:DefaultBarItemNames.StatusBarItem_Min}"/>
        <dxb:RemoveAction ElementName="{x:Static dxsps:DefaultBarItemNames.StatusBarItem_Max}"/>
        <!--Remove the MIN and MAX items from the Customize Status Bar context menu.-->
        <dxb:RemoveAction ElementName="{x:Static dxsps:DefaultBarItemNames.StatusBarItem_PopupMenu_Min}"/>
        <dxb:RemoveAction ElementName="{x:Static dxsps:DefaultBarItemNames.StatusBarItem_PopupMenu_Max}"/>
        <!--Add the File Name item to the status bar. This item displays a path to the current workbook.-->
        <dxb:InsertAction ContainerName="{x:Static dxsps:DefaultBarItemNames.StatusBarControl}" CollectionTag="LeftStatusBarItems">
            <dxb:BarStaticItem Content="{Binding ElementName=spreadsheetControl, Path=Options.Save.CurrentFileName, Mode=OneWay}" 
                               IsVisible="{Binding ElementName=showFileName, Path=IsChecked}"/>
        </dxb:InsertAction>
        <!--Add the File Name item to the Customize Status Bar context menu.
        This item allows users to control the File Name item's visibility on the status bar.-->
        <dxb:InsertAction ContainerName="{x:Static dxsps:DefaultBarItemNames.StatusBar_PopupMenu}">
            <dxb:BarCheckItem x:Name="showFileName" Content="File Name" IsChecked="True"/>
        </dxb:InsertAction>
    </dxsps:SpreadsheetControl.StatusBarActions>
</dxsps:SpreadsheetControl>
See Also