Class RadzenAccordion
RadzenAccordion component.
Implements
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenAccordion : RadzenComponent, IDisposable
Examples
<RadzenAccordion>
<Items>
<RadzenAccordionItem Text="Orders" Icon="account_balance_wallet">
Details for Orders
</RadzenAccordionItem>
<RadzenAccordionItem Text="Employees" Icon="account_box">
Details for Employees
</RadzenAccordionItem>
</Items>
</RadzenAccordion>
Properties
Collapse
Gets or sets a callback raised when the item is collapsed.
Declaration
public EventCallback<int> Collapse { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<System.Int32> | The collapse. |
Expand
Gets or sets a callback raised when the item is expanded.
Declaration
public EventCallback<int> Expand { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<System.Int32> | The expand. |
Items
Gets or sets the items.
Declaration
public RenderFragment Items { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment | The items. |
Multiple
Gets or sets a value indicating whether multiple items can be expanded.
Declaration
public bool Multiple { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
SelectedIndex
Gets or sets the index of the selected item.
Declaration
public int SelectedIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The index of the selected item. |
SelectedIndexChanged
Gets or sets the value changed.
Declaration
public EventCallback<int> SelectedIndexChanged { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<System.Int32> | The value changed. |
Methods
AddItem(RadzenAccordionItem)
Adds the item.
Declaration
public void AddItem(RadzenAccordionItem item)
Parameters
Type | Name | Description |
---|---|---|
RadzenAccordionItem | item | The item. |
GetComponentCssClass()
Gets the component CSS class.
Declaration
protected override string GetComponentCssClass()
Returns
Type | Description |
---|---|
System.String |
Overrides
IsSelected(Int32, RadzenAccordionItem)
Determines whether the specified index is selected.
Declaration
protected bool IsSelected(int index, RadzenAccordionItem item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index. |
RadzenAccordionItem | item | The item. |
Returns
Type | Description |
---|---|
System.Boolean |
|
ItemAriaLabel(Int32, RadzenAccordionItem)
Gets the item's aria-label attribute value.
Declaration
protected string ItemAriaLabel(int index, RadzenAccordionItem item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index. |
RadzenAccordionItem | item | The item. |
Returns
Type | Description |
---|---|
System.String | The item's collapse or expand aria-label value depending on if the item is expanded or collapsed. If the relevant aria-label is null or whitespace this method returns "Expand" or "Collapse". |
ItemTitle(Int32, RadzenAccordionItem)
Gets the item's title attribute value.
Declaration
protected string ItemTitle(int index, RadzenAccordionItem item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index. |
RadzenAccordionItem | item | The item. |
Returns
Type | Description |
---|---|
System.String | The item's collapse or expand title value depending on if the item is expanded or collapsed. If the relevant title is null or whitespace this method returns "Expand" or "Collapse". |
RemoveItem(RadzenAccordionItem)
Removes the item.
Declaration
public void RemoveItem(RadzenAccordionItem item)
Parameters
Type | Name | Description |
---|---|---|
RadzenAccordionItem | item | The item. |
SetParametersAsync(ParameterView)
Called by the Blazor runtime when parameters are set.
Declaration
public override async Task SetParametersAsync(ParameterView parameters)
Parameters
Type | Name | Description |
---|---|---|
ParameterView | parameters | The parameters. |
Returns
Type | Description |
---|---|
Task |