Back to Devexpress

AccordionItem.HighlightOnPress Property

wpf-devexpress-dot-xpf-dot-accordion-dot-accordionitem-bef77380.md

latest2.6 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Wpf.Accordion

Declaration

csharp
public bool? HighlightOnPress { get; set; }
vb
Public Property HighlightOnPress As Boolean?

Property Value

TypeDescription
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:

PropertyDescription
AccordionItem.HighlightOnHoverGets or sets whether the current item is highlighted when an end-user moves the mouse cursor over it.
HighlightOnPressGets 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:

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

AccordionItem Class

AccordionItem Members

DevExpress.Xpf.Accordion Namespace