Back to Devexpress

BarStaticItem Class

wpf-devexpress-dot-xpf-dot-bars-ab90a4ec.md

latest5.5 KB
Original Source

BarStaticItem Class

Represents a bar item that allows you to display static text.

Namespace : DevExpress.Xpf.Bars

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public class BarStaticItem :
    BarItem
vb
Public Class BarStaticItem
    Inherits BarItem

Remarks

Use a BarStaticItem object to display static text in bars and menus.

You can customize the auto-size mode for BarStaticItem items via the BarStaticItem.AutoSizeMode property. Setting this property to Fill stretches the item’s links, so that they occupy the largest possible area of a bar.

The following code snippets (auto-collected from DevExpress Examples) contain references to the BarStaticItem class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-spreadsheet-assign-custom-in-place-editors/CS/WpfSpreadsheet_CustomCellEditors/MainWindow.xaml#L722

xml
<dxb:BarButtonItem x:Name="biPageSetupAddPrintArea" Command="{Binding PageSetupAddPrintArea, Mode=OneTime, Source={StaticResource commands}}" />
<dxb:BarStaticItem x:Name="biViewShowGridlines" ContentTemplate="{Binding CheckEditTemplate, Mode=OneTime, Source={StaticResource defaultBarItemTemplates}}" Command="{Binding ViewShowGridlines, Mode=OneTime, Source={StaticResource commands}}" />
<dxb:BarStaticItem x:Name="biViewShowHeadings" ContentTemplate="{Binding CheckEditTemplate, Mode=OneTime, Source={StaticResource defaultBarItemTemplates}}" Command="{Binding ViewShowHeadings, Mode=OneTime, Source={StaticResource commands}}" />

wpf-spreadsheet-bind-spreadsheet-to-ms-sql-server-database/CS/WpfSpreadsheet_BindToDataSource/MainWindow.xaml#L725

xml
<dxb:BarButtonItem x:Name="biPageSetupPrintTitles" Command="{Binding PageSetupPrintTitles, Mode=OneTime, Source={StaticResource commands}}" />
<dxb:BarStaticItem x:Name="biViewShowGridlines" ContentTemplate="{Binding CheckEditTemplate, Mode=OneTime, Source={StaticResource defaultBarItemTemplates}}" Command="{Binding ViewShowGridlines, Mode=OneTime, Source={StaticResource commands}}" />
<dxb:BarStaticItem x:Name="biViewShowHeadings" ContentTemplate="{Binding CheckEditTemplate, Mode=OneTime, Source={StaticResource defaultBarItemTemplates}}" Command="{Binding ViewShowHeadings, Mode=OneTime, Source={StaticResource commands}}" />

wpf-docklayoutmanager-merge-ribbon-controls/CS/WpfApplication1/MainWindow.xaml#L26

xml
<dxr:RibbonStatusBarControl.LeftItems>
    <dxb:BarStaticItem x:Name="biRow" Content="Row:" ShowBorder="False" MergeType="MergeItems"/>
    <dxb:BarStaticItem x:Name="biRowValue" Content="1" MergeType="MergeItems"/>

wpf-create-a-ribboncontrol/CS/RibbonControl_Ex/MainWindow.xaml#L265

xml
<dxr:RibbonStatusBarControl.RightItems>
    <dxb:BarStaticItem Name="bFileName" ItemMinWidth="150" AutoSizeMode="Fill" Content="Binding"/>
</dxr:RibbonStatusBarControl.RightItems>

wpf-spreadsheet-control-create-a-data-entry-form/CS/WpfDataEntryFormSample/MainWindow.xaml#L58

xml
Command="{DXCommand Execute='MovePrevious()', CanExecute='CanMovePrevious()'}" />
<dxb:BarStaticItem Content="{DXBinding Expr='DisplayText'}"/>
<dxb:BarButtonItem

Implements

IControllerAction

Inheritance

Object DispatcherObject DependencyObject ContentElement FrameworkContentElement BarItem BarStaticItem

See Also

BarStaticItem Members

Items and Links

DevExpress.Xpf.Bars Namespace