Back to Devexpress

BarItem.BarItemDisplayMode Property

wpf-devexpress-dot-xpf-dot-bars-dot-baritem-5e867d49.md

latest5.4 KB
Original Source

BarItem.BarItemDisplayMode Property

Gets or sets how links to the current bar item are displayed on-screen. This is a dependency property.

Namespace : DevExpress.Xpf.Bars

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public BarItemDisplayMode BarItemDisplayMode { get; set; }
vb
Public Property BarItemDisplayMode As BarItemDisplayMode

Property Value

TypeDescription
BarItemDisplayMode

A BarItemDisplayMode value that specifies the required display mode.

|

Available values:

NameDescription
Default

A link is represented on-screen using default settings, and this is dependant on the position where the link is displayed (in a bar or menu).

| | Content |

A link is represented on-screen using the item’s BarItem.Content.

| | ContentAndGlyph |

A link is represented on-screen using the item’s BarItem.Content and glyph (BarItem.Glyph or BarItem.LargeGlyph).

|

Remarks

The BarItemDisplayMode property specifies the default display mode for all links that refer to the current item. To override this setting for individual links, use the BarItemLinkBase.BarItemDisplayMode property.

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

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-data-grid-implement-crud-operations/CS/CodeBehind/EFCore/LocalData/MainWindow.xaml#L15

xml
<dxb:BarButtonItem Content="Refresh (F5)" Command="{Binding View.Commands.RefreshDataSource, ElementName=grid}"
                   Glyph="{dx:DXImage SvgImages/Icon Builder/Actions_Refresh.svg}" BarItemDisplayMode="ContentAndGlyph" />
<dxb:BarButtonItem Content="Edit (F2)" Command="{Binding View.Commands.EditFocusedRow, ElementName=grid}"

wpf-data-grid-extend-crud-operations/CS/AsyncCRUDOperations/MainWindow.xaml#L15

xml
<dxb:ToolBarControl>
    <dxb:BarButtonItem Content="Refresh (F5)" Command="{Binding View.Commands.RefreshDataSource, ElementName=grid}" Glyph="{dx:DXImage SvgImages/Icon Builder/Actions_Refresh.svg}" BarItemDisplayMode="ContentAndGlyph" />
    <dxb:BarButtonItem Content="Edit (F2)" Command="{Binding View.Commands.EditFocusedRow, ElementName=grid}" Glyph="{dx:DXImage SvgImages/Icon Builder/Actions_Edit.svg}" BarItemDisplayMode="ContentAndGlyph" />

wpf-svgimagesource-extension-specify-vector-image-as-glyph/CS/DXSample/MainWindow.xaml#L18

xml
Glyph="{dx:SvgImageSource Uri=Images/Notebook.svg}"
BarItemDisplayMode="ContentAndGlyph"
GlyphSize="{Binding ElementName=sizeEditor, Path=EditValue}"/>

mvvm-application-with-wpf-bars/CS/Bars_in_MVVM_Application/MainWindow.xaml#L36

xml
Glyph="{dx:DXImage 'SvgImages/Icon Builder/Actions_AddCircled.svg'}"
                   BarItemDisplayMode="ContentAndGlyph"/>
<dxb:BarButtonItem x:Name="removeItem"

wpf-bars-mvvm-generate-bars-from-view-model-collection/CS/DXSample/MainWindow.xaml#L25

xml
GlyphAlignment="Top"
BarItemDisplayMode="ContentAndGlyph"
Command="{Binding ExecuteActionCommand}"

See Also

BarItemLinkBase.BarItemDisplayMode

Bar.BarItemDisplayMode

ToolBarControlBase.BarItemDisplayMode

BarContainerControl.BarItemDisplayMode

BarItem Class

BarItem Members

DevExpress.Xpf.Bars Namespace