wpf-devexpress-dot-xpf-dot-bars-ab90a4ec.md
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
public class BarStaticItem :
BarItem
Public Class BarStaticItem
Inherits BarItem
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.
<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}}" />
<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
<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
<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
Command="{DXCommand Execute='MovePrevious()', CanExecute='CanMovePrevious()'}" />
<dxb:BarStaticItem Content="{DXBinding Expr='DisplayText'}"/>
<dxb:BarButtonItem
Object DispatcherObject DependencyObject ContentElement FrameworkContentElement BarItem BarStaticItem
See Also