BackstageItemWithImage.Glyph Property
Gets or sets the item’s image. This is a dependency property.
Namespace: DevExpress.Xpf.Ribbon
Assembly: DevExpress.Xpf.Ribbon.v21.1.dll
NuGet Package: DevExpress.Wpf.Ribbon
Declaration
Property Value
Type | Description |
---|---|
ImageSource | A ImageSource object that is the item’s glyph. |
Remarks
Use the Glyph to specify a backstage’s item or tab image. The Glyph property accepts the following image file extensions:
- .jpg,
- .bmp,
- .gif,
- .png,
- .svg.
Note
If you use a GIF-animated picture, the BackstageView displays only the animation’s first frame.
Use the BackstageItemWithImage.GlyphContainerStyle and BackstageItemWithImage.GlyphStyle properties to change the glyph container’s and an image’s styles.
Control images can be automatically substituted for other images based on the app context (the system DPI setting, the application UI culture, paint theme and touch mode availability). See the following topic to learn more: Automatically Choosing Images Based on App Context.
The following code sample displays the Home and File BackstageTabItem‘ glyphs:
<Window ...
xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon">
<dxr:RibbonControl>
<dxr:RibbonControl.ApplicationMenu>
<dxr:BackstageViewControl>
<dxr:BackstageTabItem Content="Home" Glyph="{dx:SvgImageSource Uri='pack://application:,,,/RibbonDemo;component/Images/Icons/Home_16x16.svg'}">
<dxr:BackstageTabItem.ControlPane>
<!-- Tab Content -->
</dxr:BackstageTabItem.ControlPane>
</dxr:BackstageTabItem>
<dxr:BackstageTabItem Content="New" Glyph="{dx:SvgImageSource Uri='pack://application:,,,/RibbonDemo;component/Images/Icons/New_16x16.svg'}">
<dxr:BackstageTabItem.ControlPane>
<!-- Tab Content -->
</dxr:BackstageTabItem.ControlPane>
</dxr:BackstageTabItem>
</dxr:BackstageViewControl>
</dxr:RibbonControl.ApplicationMenu>
<!-- Ribbon Content -->
</dxr:RibbonControl>
</Window>
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Glyph 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.