ExpandableContentRenderMode Enum
Lists values that specify when expandable block content is rendered.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v26.1.dll
Declaration
public enum ExpandableContentRenderMode
Members
| Name | Description |
|---|---|
Expanded
|
Re-renders content every time the block is expanded and removes it from the DOM when the block is collapsed. |
All
|
Renders all content on page load, regardless of the expansion state. |
OnDemand
|
Adds content to the DOM the first time an item is expanded and keeps it in the DOM after the item is collapsed. |
Related API Members
The following properties accept/return ExpandableContentRenderMode values:
Remarks
ExpandableContentRenderMode enumeration specifies when expandable block content is rendered in the DOM. Select the mode that fits your usage scenario best:
| Value | Benefit | Tradeoff |
|---|---|---|
Expanded |
Minimizes the initial DOM size and speeds up page load. | Adds a brief re-render delay each time the user expands the block. |
All |
Eliminates re-render delays and improves UI responsiveness. | Increases initial page load time and DOM size. |
OnDemand |
Balances page load performance and responsiveness. | Adds a brief render delay the first time the block is expanded. |
The following code snippet pre-renders all Accordion items on page load:
<DxAccordion RenderMode="ExpandableContentRenderMode.All">
<Items>
<DxAccordionItem Text="Shapes" Expanded="true">
<Items>
<DxAccordionItem Text="Circle" />
<DxAccordionItem Text="Square" />
</Items>
</DxAccordionItem>
<DxAccordionItem Text="Templates" />
</Items>
</DxAccordion>