Back to Devexpress

CheckEdit.GlyphTemplate Property

wpf-devexpress-dot-xpf-dot-editors-dot-checkedit-7b5d82e9.md

latest2.4 KB
Original Source

CheckEdit.GlyphTemplate Property

Gets or sets a template used to render the CheckEdit’s glyphs. This is a dependency property.

Namespace : DevExpress.Xpf.Editors

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public DataTemplate GlyphTemplate { get; set; }
vb
Public Property GlyphTemplate As DataTemplate

Property Value

TypeDescription
DataTemplate

A DataTemplate object that represents the editor’s glyph template.

|

Remarks

Use the CheckedGlyph, IndeterminateGlyph, and UncheckedGlyph properties to specify glyphs for all the CheckEdit’s states.

The CheckEdit control scales the specified glyphs to 16px. To customize the rendered image size, pass a custom data template to the GlyphTemplate property like in the code sample below.

xaml
<dxe:CheckEdit
    Content="CheckEdit"
    CheckedGlyph="TrafficLightGreen.png"
    UncheckedGlyph="TrafficLightRed.png"
    IndeterminateGlyph="TrafficLightYellow.png"
    IsThreeState="True">
    <dxe:CheckEdit.GlyphTemplate>
        <DataTemplate>
            <!-- This data template uses images specified via the
                 CheckedGlyph, UncheckedGlyph, and IndeterminateGlyph properties.
                 The custom images are passed to the template's DataContext -->
            <Image Source="{Binding}" Height="32" Width="72"/>
        </DataTemplate>
    </dxe:CheckEdit.GlyphTemplate>
    <dxe:CheckEdit.StyleSettings>
        <dxe:ImageCheckEditStyleSettings />
    </dxe:CheckEdit.StyleSettings>
</dxe:CheckEdit>

See Also

CheckEdit Class

CheckEdit Members

DevExpress.Xpf.Editors Namespace