Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

AccordionItem.HighlightOnPress Property

Gets or sets whether the current item is highlighted when an end-user clicks and holds the left mouse button. This is a dependency property.

Namespace: DevExpress.Xpf.Accordion

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

NuGet Package: DevExpress.Wpf.Accordion

#Declaration

public bool? HighlightOnPress { get; set; }

#Property Value

Type Description
Nullable<Boolean>

true, to highlight the current item; otherwise, false.

#Remarks

Selectable and expandable accordion items are highlighted when you move the mouse cursor over them. Use the following properties to change this behavior:

Property Description
AccordionItem.HighlightOnHover Gets or sets whether the current item is highlighted when an end-user moves the mouse cursor over it.
HighlightOnPress Gets or sets whether the current item is highlighted when an end-user clicks and holds the left mouse button.

The following code sample shows an accordion item that you can highlight but not select:

<dxa:AccordionControl SelectionMode="None">
   <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}" HighlightOnHover="True" />
      <dxa:AccordionItem Header="SubItem" Glyph="{dx:DXImage Image=Map_16x16.png}" />
   </dxa:AccordionItem>
</dxa:AccordionControl>

The image below shows the result:

AccordionSelectionHighlight

Refer to the Selection topic to learn more.

See Also