DxAccordion.CollapseAll() Method
Collapses all items.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
public void CollapseAll()
Remarks
The component may require at least one item to remain expanded. See the ExpandMode property description for details.
The following code snippet collapses all Accordion items on button click:
<DxButton Text="Collapse All" Click="@(() => Accordion.CollapseAll())"></DxButton>
<DxAccordion @ref="Accordion">
<Items>
@* ... *@
</Items>
</DxAccordion>
@code {
DxAccordion Accordion;
@* ... *@
}
See Also