Back to Devexpress

CommandButton.AllowGlyphTheming Property

wpf-devexpress-dot-xpf-dot-windowsui-dot-commandbutton-638f17bf.md

latest3.0 KB
Original Source

CommandButton.AllowGlyphTheming Property

Gets whether the button icon is colored according to the currently applied theme. This is a dependency property.

Namespace : DevExpress.Xpf.WindowsUI

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

NuGet Package : DevExpress.Wpf.Controls

Declaration

csharp
public bool AllowGlyphTheming { get; set; }
vb
Public Property AllowGlyphTheming As Boolean

Property Value

TypeDescription
Boolean

true, if the button icon is colored according to the currently applied theme; otherwise, false. The default is false.

|

Remarks

By default, when the AllowGlyphTheming property is set to False , the button icon (see CommandButton.Glyph) is displayed as is. You can set the AllowGlyphTheming property to True to paint the icon based on the currently applied theme.

For better visual results, when applying the glyph theming feature, we recommend using gray-scaled icons from the DX Image Gallery.

Below, you can see the AppBar control displayed in different themes. Note that the button icons are painted based on the applied theme.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AllowGlyphTheming 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-appbar-display-windows-10-top-bottom-menu/CS/AppBarExample/MainWindow.xaml#L30

xml
<Style TargetType="dxwui:AppBarButton">
    <Setter Property="AllowGlyphTheming" Value="True" />
    <Setter Property="GlyphHeight" Value="24" />

See Also

Glyph

Theme List

CommandButton Class

CommandButton Members

DevExpress.Xpf.WindowsUI Namespace