# Children Path | WPF Controls | DevExpress Documentation

This topic describes how to bind the [AccordionControl](/WPF/DevExpress.Xpf.Accordion.AccordionControl) to data if all objects in your data source are the same type.

The table below shows the required properties:

| Member | Description |
| --- | --- |
| [AccordionControl.ItemsSource](/WPF/DevExpress.Xpf.Accordion.AccordionControl.ItemsSource) | Specifies the path to a collection of accordion items. |
| [AccordionControl.ChildrenPath](/WPF/DevExpress.Xpf.Accordion.AccordionControl.ChildrenPath) | Specifies the path to the property that contains an accordion item’s children. |
| [AccordionControl.DisplayMemberPath](/WPF/DevExpress.Xpf.Accordion.AccordionControl.DisplayMemberPath) | Specifies the path to the property whose value the accordion item’s header displays. |

Complete the following steps to configure the binding:

1. Specify the [AccordionControl.ItemsSource](/WPF/DevExpress.Xpf.Accordion.AccordionControl.ItemsSource) property to bind the [AccordionControl](/WPF/DevExpress.Xpf.Accordion.AccordionControl) to data:

- XAML

<section id="tabpanel_SQEtKthTfg_tabid-xaml" role="tabpanel" data-tab="tabid-xaml">
<pre><code class="lang-xaml">&lt;dxa:AccordionControl Name=&quot;accordion&quot; ItemsSource=&quot;{Binding AppMenu.MenuItems}&quot;/&gt;
</code></pre></section>

- C#
    - VB.NET

<section id="tabpanel_SQEtKthTfg-1_tabid-csharp" role="tabpanel" data-tab="tabid-csharp">
<pre><code class="lang-csharp">class ViewModel {
    public Menu AppMenu { get; set; }
    public ViewModel() {
        AppMenu = new Menu();
    }
}
public class Menu {
    public List&lt;MenuItem&gt; MenuItems { get; set; }
    public Menu() {
        MenuItems = GetMenuItems();
    }
    private static List&lt;MenuItem&gt; GetMenuItems() { 
        // ...
    }
}
public class MenuItem {
    public string Caption { get; set; }
    public List&lt;MenuItem&gt; SubItems { get; set; }
}
</code></pre></section>
<section id="tabpanel_SQEtKthTfg-1_tabid-vb" role="tabpanel" data-tab="tabid-vb" aria-hidden="true" hidden="hidden">
<pre><code class="lang-vb">Class ViewModel
    Public Property AppMenu() As Menu
    Public Sub New()
        AppMenu = New Menu()
    End Sub
End Class
Public Class Menu
    Public Property MenuItems() As List(Of MenuItem)
    Public Sub New()
        MenuItems = GetMenuItems()
    End Sub
    Private Shared Function GetMenuItems() As List(Of MenuItem)
        &#39; ...
    End Function
End Class
Public Class MenuItem
    Public Property Caption() As String
    Public Property SubItems() As List(Of MenuItem)
End Class
</code></pre></section>
2. Specify the [AccordionControl.ChildrenPath](/WPF/DevExpress.Xpf.Accordion.AccordionControl.ChildrenPath) property to build the accordion item hierarchy:

- XAML

<section id="tabpanel_SQEtKthTfg-2_tabid-xaml" role="tabpanel" data-tab="tabid-xaml">
<pre><code class="lang-xaml">&lt;dxa:AccordionControl Name=&quot;accordion&quot; ItemsSource=&quot;{Binding AppMenu.MenuItems}&quot; 
    ChildrenPath=&quot;SubItems&quot;/&gt;
</code></pre></section>
3. Specify the [AccordionControl.DisplayMemberPath](/WPF/DevExpress.Xpf.Accordion.AccordionControl.DisplayMemberPath) property to display the required information in accordion item headers:

- XAML

<section id="tabpanel_SQEtKthTfg-3_tabid-xaml" role="tabpanel" data-tab="tabid-xaml">
<pre><code class="lang-xaml">&lt;dxa:AccordionControl Name=&quot;accordion&quot; ItemsSource=&quot;{Binding AppMenu.MenuItems}&quot; 
    ChildrenPath=&quot;SubItems&quot; 
    DisplayMemberPath=&quot;Caption&quot;/&gt;
</code></pre></section>

The image below shows the result:

![AccordionDataBindingChildrenPath](/WPF/images/accordiondatabindingchildrenpath132243.png)

## Example

- [How to: Bind the AccordionControl to Data Using the ChildrenPath Property](/WPF/119897/controls-and-libraries/navigation-controls/accordion-control/examples/how-to-bind-the-accordioncontrol-to-data-using-the-childrenpath-property)