Table of Contents

Class RadzenAccordion

Namespace
Radzen.Blazor
Assembly
Radzen.Blazor.dll

RadzenAccordion component.

public class RadzenAccordion : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance
RadzenAccordion
Implements
Inherited Members

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>

Constructors

RadzenAccordion()

public RadzenAccordion()

Properties

Collapse

Gets or sets a callback raised when the item is collapsed.

[Parameter]
public EventCallback<int> Collapse { get; set; }

Property Value

EventCallback<int>

The collapse.

Expand

Gets or sets a callback raised when the item is expanded.

[Parameter]
public EventCallback<int> Expand { get; set; }

Property Value

EventCallback<int>

The expand.

Items

Gets or sets the items.

[Parameter]
public RenderFragment Items { get; set; }

Property Value

RenderFragment

The items.

Multiple

Gets or sets a value indicating whether multiple items can be expanded.

[Parameter]
public bool Multiple { get; set; }

Property Value

bool

true if multiple items can be expanded; otherwise, false.

SelectedIndex

Gets or sets the index of the selected item.

[Parameter]
public int SelectedIndex { get; set; }

Property Value

int

The index of the selected item.

SelectedIndexChanged

Gets or sets the value changed.

[Parameter]
public EventCallback<int> SelectedIndexChanged { get; set; }

Property Value

EventCallback<int>

The value changed.

Methods

AddItem(RadzenAccordionItem)

Adds the item.

public void AddItem(RadzenAccordionItem item)

Parameters

item RadzenAccordionItem

The item.

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

GetComponentCssClass()

protected override string GetComponentCssClass()

Returns

string

IsSelected(int, RadzenAccordionItem)

Determines whether the specified index is selected.

protected bool IsSelected(int index, RadzenAccordionItem item)

Parameters

index int

The index.

item RadzenAccordionItem

The item.

Returns

bool

true if the specified index is selected; otherwise, false.

ItemAriaLabel(int, RadzenAccordionItem)

Gets the item's aria-label attribute value.

protected string ItemAriaLabel(int index, RadzenAccordionItem item)

Parameters

index int

The index.

item RadzenAccordionItem

The item.

Returns

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(int, RadzenAccordionItem)

Gets the item's title attribute value.

protected string ItemTitle(int index, RadzenAccordionItem item)

Parameters

index int

The index.

item RadzenAccordionItem

The item.

Returns

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.

public void RemoveItem(RadzenAccordionItem item)

Parameters

item RadzenAccordionItem

The item.

SetParametersAsync(ParameterView)

public override Task SetParametersAsync(ParameterView parameters)

Parameters

parameters ParameterView

Returns

Task