Skip to main content

AccordionControl.SelectionUnit Property

Gets or sets whether an end-user can select subitems or both subitems and root items. This is a dependency property.

Namespace: DevExpress.Xpf.Accordion

Assembly: DevExpress.Xpf.Accordion.v22.1.dll

NuGet Package: DevExpress.Wpf.Accordion


public SelectionUnit SelectionUnit { get; set; }

Property Value

Type Description

A SelectionUnit enumeration value. The default is SelectionUnit.SubItemOrRootItem.

Available values:

Name Description

Both the root items and subitems can be selected.


Only subitems can be selected.


You can specify accordion item types an end-user can select.

Set the SelectionUnit property to:

The following code sample demonstrates an AccordionControl that allows selecting subitems only:

<dxa:AccordionControl SelectionUnit="SubItem">
   <dxa:AccordionItem Header="Root Item" Glyph="{dx:DXImage Image=Image_32x32.png}"/>
   <dxa:AccordionItem Header="Root Item" Glyph="{dx:DXImage Image=Map_32x32.png}">
      <dxa:AccordionItem Header="SubItem" Glyph="{dx:DXImage Image=Map_16x16.png}"/>
      <dxa:AccordionItem Header="SubItem" Glyph="{dx:DXImage Image=Map_16x16.png}"/>

The image below shows the result:


See Also