Back to Devexpress

Hierarchical Data Template

wpf-119794-controls-and-libraries-navigation-controls-accordion-control-data-binding-hierarchical-data-template.md

latest1.6 KB
Original Source

Hierarchical Data Template

  • Aug 12, 2021
  • 2 minutes to read

This topic describes how to bind the AccordionControl to data using System.Windows.HierarchicalDataTemplate objects.

The table below shows the required properties:

MemberDescription
AccordionControl.ItemsSourceSpecifies the path to a collection of accordion items.
AccordionControl.ItemTemplateSpecifies the template that defines the presentation of accordion items and the path to their children.

Complete the following steps to configure the binding:

  1. Specify the AccordionControl.ItemsSource property to bind the AccordionControl to data:

  2. Create a hierarchical data template and assign it to the AccordionControl.ItemTemplate property to display the required information in accordion item headers:

The image below shows the result:

Example