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.CanSelect Property

Specifies whether the current accordion item can be selected with mouse or keyboard. This is a dependency property.

Namespace: DevExpress.Xpf.Accordion

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

NuGet Package: DevExpress.Wpf.Accordion

#Declaration

public bool CanSelect { get; set; }

#Property Value

Type Description
Boolean

true, if the current accordion item can be selected; otherwise, false.

#Remarks

Set the CanSelect property to false to prevent a current item from being selected by mouse or via keyboard.

<Window ...
        xmlns:dxa="http://schemas.devexpress.com/winfx/2008/xaml/accordion">
    <dxa:AccordionControl>
        <dxa:AccordionItem Header="Start Page"/>
        <dxa:AccordionItem Header="Preferences">
            <dxa:AccordionItem Header="Account Info"/>
            <!-- This accordion item cannot be selected -->
            <dxa:AccordionItem Header="Application Settings" CanSelect="False"/>
        </dxa:AccordionItem>
        <dxa:AccordionItem Header="About"/>
    </dxa:AccordionControl>
</Window>
See Also