blazor-devexpress-dot-blazor-dot-dxaccordionitem-bfb91058.md
Fires when a user clicks the Accordion item.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[Parameter]
public EventCallback<AccordionItemClickEventArgs> Click { get; set; }
The Click event's data class is AccordionItemClickEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| ItemInfo | Returns information about an item related to the event. Inherited from AccordionItemEventArgs. |
| MouseEventArgs | The Blazor’s built-in MouseEventArgs event arguments. |
Use the DxAccordionItem.Click event to react to click on the specific item. The following code snippet handles the Click event:
<DxAccordion>
<Items>
<DxAccordionItem Click=@OnClick Text="Navigation and Layout" />
@* ... *@
</Items>
</DxAccordion>
@code {
void OnClick(AccordionItemClickEventArgs args) {
var Item = args.ItemInfo;
}
}
If you want to have one event handler for all items, use the DxAccordion.Click event.
See Also