Back to Devexpress

Accordion Item

wpf-118546-controls-and-libraries-navigation-controls-accordion-control-visual-elements-accordion-item.md

latest3.0 KB
Original Source

Accordion Item

  • Apr 19, 2022

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

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:

Use the EmptySourceText property to change the notification text.

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

xaml
<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>

The HasItems property indicates whether the AccordionControl contains items.