Skip to main content

BackstageButtonItem.GlyphStyle Property

Gets or sets a style applied to the item's glyph (BackstageButtonItem.Glyph). This is a dependency property.

Namespace: DevExpress.Xpf.Ribbon

Assembly: DevExpress.Xpf.Ribbon.v14.2.dll

Declaration

[Browsable(false)]
public Style GlyphStyle { get; set; }
<Browsable(False)>
Public Property GlyphStyle As Style

Property Value

Type Description
Style

A Style object applied to the item's glyph.

Remarks

Target Type: Image.

The GlyphStyle regulates style properties for a BackstageButtonItem.Glyph. To learn more, see the following example.

Examples

When you set an image to a BackstageButtonItem's BackstageButtonItem.Glyph property, it is placed inside a glyph container. Both a glyph container and an image within it have properties which can be changed using the BackstageButtonItem.GlyphStyle and BackstageButtonItem.GlyphContainerStyle styles.

In the following code an image's height and width are set to 32 pixels, a container's height and width - to 100. The image is shown at the left top corner of the container due to the alignment specified in the BackstageButtonItem.GlyphStyle.

DXRibbon GlyphContainer example

<Window.Resources>

        ...

        <Style x:Key="myGlyphStyle" TargetType="Image">
            <Setter Property="VerticalAlignment" Value="Top"/>
            <Setter Property="HorizontalAlignment" Value="Left"/>
            <Setter Property="Height" Value="32"/>
            <Setter Property="Width" Value="32"/>
        </Style>

        <Style x:Key="myGlyphContainerStyle" TargetType="ContentControl">
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="Height" Value="100"/>
            <Setter Property="Width" Value="100"/>
        </Style>

        ...

    </Window.Resources>

<dxr:BackstageButtonItem  Content="DevHelp" Glyph="D:\Work\Icon.png" GlyphStyle="{StaticResource myGlyphStyle}" GlyphContainerStyle="{StaticResource myGlyphContainerStyle}"/>
...
See Also