Skip to main content

AccordionItemCancelEventArgs Class

Stores data for the BeforeCollapse and BeforeExpand events.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

public class AccordionItemCancelEventArgs :
    AccordionItemStateChangeEventArgs

Remarks

The following code snippet cancels the collapse action for root-level nodes:

<DxAccordion BeforeCollapse="@BeforeCollapse">
    @* ... *@
</DxAccordion>

@code  {
    void BeforeCollapse(AccordionItemCancelEventArgs args) {
        if (args.ItemInfo.Level == 0) args.Cancel = true;
    }
}
See Also