Back to Devexpress

AccordionControl.ItemsSource Property

wpf-devexpress-dot-xpf-dot-accordion-dot-accordioncontrol-5391bd5f.md

latest4.1 KB
Original Source

AccordionControl.ItemsSource Property

Gets or sets the AccordionControl‘s data source. This is a dependency property.

Namespace : DevExpress.Xpf.Accordion

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

NuGet Package : DevExpress.Wpf.Accordion

Declaration

csharp
public IEnumerable ItemsSource { get; set; }
vb
Public Property ItemsSource As IEnumerable

Property Value

TypeDescription
IEnumerable

An object that represents the data source from which the AccordionControl retrieves its items.

|

Remarks

Refer to the Data Binding and Adding Accordion Items topics to learn more.

Note

The AccordionControl does not support data sources with many-to-many relationships.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ItemsSource 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-accordion-customize-appearance/CS/AppearanceCustomization/MainWindow.xaml#L29

xml
<dxa:AccordionControl x:Name="accordion"
                      ItemsSource="{Binding Items}"
                      SelectedItem="{Binding SelectedItem}"

wpf-accordion-bind-to-data-hierarchicaldatatemplate/CS/HierarchicalDataTemplate/MainWindow.xaml#L21

xml
<dxa:AccordionControl x:Name="accordion" SelectionUnit="SubItem"
                      ItemsSource="{Binding MyData.Categories }" SelectedItem="{Binding SelectedItem}">
    <dxa:AccordionControl.ItemTemplate>

wpf-accordion-bind-to-data-using-childrenpath/CS/ChildrenPath/MainWindow.xaml#L20

xml
<Border Margin="5" Grid.Column="0" BorderBrush="Black" BorderThickness="1">
    <dxa:AccordionControl Name="accordion" ItemsSource="{Binding AppMenu.MenuItems }"
                          SelectedItem="{Binding SelectedItem}"

wpf-accordion-bind-to-hierarchical-objects-of-different-types/CS/ChildrenSelector/MainWindow.xaml#L23

xml
<Border Margin="5" Grid.Column="0" BorderBrush="Black" BorderThickness="1">
    <dxa:AccordionControl Name="accordion" SelectionUnit="SubItem" ItemsSource="{Binding MyData.Categories }"
                          SelectedItem="{Binding SelectedItem}" ChildrenSelector="{StaticResource mySelector}">

See Also

AccordionControl Class

AccordionControl Members

DevExpress.Xpf.Accordion Namespace