Back to Devexpress

BarItem.GlyphSize Property

wpf-devexpress-dot-xpf-dot-bars-dot-baritem-b6c27212.md

latest6.2 KB
Original Source

BarItem.GlyphSize Property

Gets or sets whether a small or large image is displayed by the bar item. This is a dependency property.

Namespace : DevExpress.Xpf.Bars

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

NuGet Package : DevExpress.Wpf.Core

Declaration

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

Property Value

TypeDescription
GlyphSize

A GlyphSize enumeration value that specifies whether a small or large image is displayed by the bar item.

|

Available values:

NameDescription
Default

The size of a bar item’s image is dependent on the settings of the bar item’s container (bar or popup menu) or the BarManager object. See the following options: Bar.GlyphSize, PopupMenu.GlyphSize, BarSubItem.SubItemsGlyphSize, BarManager.ToolbarGlyphSize, BarManager.MenuGlyphSize.

| | Small |

A bar item is using a small image specified by the BarItem.Glyph property.

| | Medium |

A bar item is using a medium image specified by the BarItem.MediumGlyph property.

| | Large |

A bar item is using a large image specified by the BarItem.LargeGlyph property.

| | Custom |

The size of the glyph is specified by the Size value.

|

Remarks

If the GlyphSize property is set to Default , the size of images is determined by the GlyphSize properties of the container (bar/menu/submenu) where the item’s links are displayed, or by the BarManager‘s corresponding setting (BarManager.ToolbarGlyphSize or BarManager.MenuGlyphSize).

Note

Use the BarItem RibbonStyle property if you want to change the size of a BarItem in the Ribbon Control.

Refer to the BarItem.Glyph property for more information.

The following code snippets (auto-collected from DevExpress Examples) contain references to the GlyphSize 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-spreadsheet-assign-custom-in-place-editors/CS/WpfSpreadsheet_CustomCellEditors/MainWindow.xaml#L692

xml
</dxb:BarSubItem>
<dxb:BarCheckItem x:Name="biPageSetupMarginsNormal" ContentTemplate="{Binding MarginBarItemContentTemplate, Mode=OneTime, Source={StaticResource defaultBarItemTemplates}}" Command="{Binding PageSetupMarginsNormal, Mode=OneTime, Source={StaticResource commands}}" GlyphSize="Large" />
<dxb:BarCheckItem x:Name="biPageSetupMarginsWide" ContentTemplate="{Binding MarginBarItemContentTemplate, Mode=OneTime, Source={StaticResource defaultBarItemTemplates}}" Command="{Binding PageSetupMarginsWide, Mode=OneTime, Source={StaticResource commands}}" GlyphSize="Large" />

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

xml
</dxb:BarSubItem>
<dxb:BarCheckItem x:Name="biPageSetupMarginsNormal" ContentTemplate="{Binding MarginBarItemContentTemplate, Mode=OneTime, Source={StaticResource defaultBarItemTemplates}}" Command="{Binding PageSetupMarginsNormal, Mode=OneTime, Source={StaticResource commands}}" GlyphSize="Large" />
<dxb:BarCheckItem x:Name="biPageSetupMarginsWide" ContentTemplate="{Binding MarginBarItemContentTemplate, Mode=OneTime, Source={StaticResource defaultBarItemTemplates}}" Command="{Binding PageSetupMarginsWide, Mode=OneTime, Source={StaticResource commands}}" GlyphSize="Large" />

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

xml
BarItemDisplayMode="ContentAndGlyph"
           GlyphSize="{Binding ElementName=sizeEditor, Path=EditValue}"/>
<dxb:BarButtonItem Content="Notebook"

See Also

Bar.GlyphSize

PopupMenu.GlyphSize

BarSubItem.SubItemsGlyphSize

BarLinkContainerItem.SubItemsGlyphSize

ToolbarGlyphSize

MenuGlyphSize

Glyph

LargeGlyph

BarItem Class

BarItem Members

DevExpress.Xpf.Bars Namespace