Name | Type | Default | Description |
DataSource | IEnumerable<object> | N/A | Determines the data source that will be loaded to the Accordion. |
Disabled | bool | false | Enables or disables the accordion. Disabled elements can not be interacted with. |
ExpandedIndexes | int[] | new int[]{} | Sets or gets the expanded item indexes. Using this property items can be expanded by passing in their indexes. The number of expanded items is limited by the expandMode. |
ExpandMode | AccordionExpandMode | AccordionExpandMode.SingleFitHeight | Sets or gets the expand mode. Expand mode determines how the items will expand or collapse. |
Locale | string | "en" | Sets or gets the language. Used in conjunction with the property messages. |
Messages | object | N/A | Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale. |
Readonly | bool | false | Determines if the element is readonly or not. If the element true, users cannot interact with it. |
Reorder | bool | false | Enables or disables accordion reordering. |
RightToLeft | bool | false | Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. |
Theme | string | "" | Determines the theme. Theme defines the look of the element |
Unfocusable | bool | false | Determines whether the element can be focused or not. |
Name | Type | Arguments | Description |
Collapse | void | int position | Collapses an item at a specified index.Args: int position - The index of the collapsed item. |
Expand | void | int position | Expands an item at a specified index.Args: int position - The index of the expanded item. |
GetDataSourceAsync() | Task<IEnumerable<object>> | 'N/A' | Gets the "DataSource" property as Task<IEnumerable<object>>. |
Insert | void | int index, object item | Inserts a new item at a specified index.Args: int index - The index where the item must be inserted.,object item - An object containing the values for the properties of the new item to be inserted. |
Refresh | void | 'N/A' | Refreshes the Blazor Component. Performs a layout of the HTML Elements and recalculates the measurements. |
RemoveAt | void | int position | Removes an item at a specified index.Args: int position - The index of the item to be removed. |
Render | void | 'N/A' | Re-renders the Blazor Component. This method will make a full re-render. |
StateHasChanged | void | 'N/A' | Refreshes the state and Re-renders the Blazor Component, if necessary. |
Update | void | int index, object settings | Updates an item from the element.Args: int index - The index of the item to be updated.,object settings - An object containing the values for the properties of the item that will be updated. |
Name | Type | Description | Event Detail |
OnCollapse | EventCallback<Event> | This event is triggered when an item is collapsed. | dynamic content- The content of the item., int index- The index of the item., string label- The label of the item |
Collapsed | event AccordionCollapsedEventHandler | This event is triggered when an item is collapsed. | AccordionCollapsedEventArgs |
OnCollapsing | EventCallback<Event> | This event is triggered when an item is going to be collapsed. | dynamic content- The content of the item., int index- The index of the item., string label- The label of the item |
Collapsing | event AccordionCollapsingEventHandler | This event is triggered when an item is going to be collapsed. | AccordionCollapsingEventArgs |
OnDragEnd | EventCallback<Event> | This event is triggered when a reordering operation is completed. | dynamic position- The current top and left position of the item that was dragged., dynamic target- The item that was dragged., dynamic content- The content of the item., int index- The index of the item., string label- The label of the item. |
DragEnded | event AccordionDragEndedEventHandler | This event is triggered when a reordering operation is completed. | AccordionDragEndedEventArgs |
OnDragStart | EventCallback<Event> | This event is triggered when a reordering operation is started. | dynamic position- The current top and left position of the item that is about to be dragged., dynamic target- The item that is about to be dragged., dynamic content- The content of the item., int index- The index of the item., string label- The label of the item. |
DragStarted | event AccordionDragStartedEventHandler | This event is triggered when a reordering operation is started. | AccordionDragStartedEventArgs |
OnExpand | EventCallback<Event> | This event is triggered when an item is expanded. | dynamic position- The current top and left position of the item., dynamic target- The item that was dragged., dynamic content- The content of the item., int index- The index of the item., string label- The label of the item. |
Expanded | event AccordionExpandedEventHandler | This event is triggered when an item is expanded. | AccordionExpandedEventArgs |
OnExpanding | EventCallback<Event> | This event is triggered when an item is going to be expanded. | dynamic content- The content of the item., int index- The index of the item., string label- The label of the item |
Expanding | event AccordionExpandingEventHandler | This event is triggered when an item is going to be expanded. | AccordionExpandingEventArgs |