Skip to main content

Accordion Item

Accordion items are AccordionItem class instances. An item‘s appearance may vary depending on its hierarchy level.

AccordionItems

The table below lists the main properties affecting the element’s behavior and appearance.

Characteristics

Members

Display mode

AccordionItem.ItemDisplayMode

Content

AccordionItem.Header

Highlighting

AccordionItem.HighlightOnHover

AccordionItem.HighlightOnPress

Selection

AccordionControl.SelectionMode

Item expandability

AccordionControl.ExpandItemOnHeaderClick

Root items style

AccordionControl.RootItemDisplayMode

Style

ItemContainerStyle

Use standard appearance properties to colorize accordion items:

BorderBrush

BorderThickness

Background

Foreground

An AccordionControl that does not contain any items displays a notification:

AccordionControl HasItems

Use the EmptySourceText property to change the notification text.

You can customize the notification by changing the EmptySourceTemplate as follows:

<dx:ThemedWindow.Resources>
    <ControlTemplate x:Key="{dxat:AccordionThemeKeys ResourceKey=EmptySourceTemplate,
        IsThemeIndependent = true}">
        <Image Source="{dx:DXImage 'SvgImages/Dashboards/DeleteDataSource.svg'}" Height="64"/> 
    </ControlTemplate>
</dx:ThemedWindow.Resources>

AccordionControl Custom EmptySourceTemplate

The HasItems property indicates whether the AccordionControl contains items.