wpf-devexpress-dot-xpf-dot-accordion-dot-accordionitem-bef77380.md
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.v25.2.dll
NuGet Package : DevExpress.Wpf.Accordion
public bool? HighlightOnPress { get; set; }
Public Property HighlightOnPress As Boolean?
| Type | Description |
|---|---|
| Nullable<Boolean> |
true, to highlight the current item; otherwise, false.
|
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:
Refer to the Selection topic to learn more.
See Also