Skip to main content

AccordionItem.GlyphTemplate Property

Gets or sets a template that defines the presentation of the glyph displayed within the current accordion item. This is a dependency property.

Namespace: DevExpress.Xpf.Accordion

Assembly: DevExpress.Xpf.Accordion.v22.1.dll

NuGet Package: DevExpress.Wpf.Accordion


public DataTemplate GlyphTemplate { get; set; }

Property Value

Type Description

A DataTemplate object that is the template which defines the presentation of the accordion item’s glyph.


Specify the GlyphTemplate property to customize the accordion item’s glyph. If you have more than one template that can be used to render the glyph, specify the AccordionItem.GlyphTemplateSelector property to implement custom logic for selecting the required template.

The following code sample demonstrates how to add a custom image to the root item:

   <dxa:AccordionItem Header="Root Item" Glyph="{dx:DXImage Image=Walking_16x16.png}" GlyphPosition="Right">
            <Border BorderThickness="1" BorderBrush="Black" Background="LightYellow">
               <Image Source="{Binding}" Margin="5"></Image>
      <dxa:AccordionItem Header="SubItem" Glyph="{dx:DXImage Image=Map_16x16.png}"/>
      <dxa:AccordionItem Header="SubItem" Glyph="{dx:DXImage Image=Map_16x16.png}"/>

The image below shows the result:


In the demonstrated code sample, the accordion item displays the glyph at the right side. Use the AccordionItem.GlyphPosition property to specify the glyph’s position. You can specify the glyph’s position for all items within the accordion control using the AccordionControl.ItemGlyphPosition property.

Refer to the Item Glyph Customization topic to learn more.

See Also