Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class RadzenAccordion

    RadzenAccordion component.

    Inheritance
    System.Object
    RadzenComponent
    RadzenAccordion
    Implements
    IDisposable
    Inherited Members
    RadzenComponent.Attributes
    RadzenComponent.Element
    RadzenComponent.MouseEnter
    RadzenComponent.MouseLeave
    RadzenComponent.ContextMenu
    RadzenComponent.Culture
    RadzenComponent.DefaultCulture
    RadzenComponent.OnMouseEnter()
    RadzenComponent.OnMouseLeave()
    RadzenComponent.OnContextMenu(Microsoft.AspNetCore.Components.Web.MouseEventArgs)
    RadzenComponent.Style
    RadzenComponent.Visible
    RadzenComponent.GetCssClass()
    RadzenComponent.GetId()
    RadzenComponent.Debounce(Func<Task>, Int32)
    RadzenComponent.UniqueID
    RadzenComponent.JSRuntime
    RadzenComponent.IsJSRuntimeAvailable
    RadzenComponent.Reference
    RadzenComponent.OnAfterRenderAsync(Boolean)
    RadzenComponent.RaiseContextMenu(Microsoft.AspNetCore.Components.Web.MouseEventArgs)
    RadzenComponent.RaiseMouseEnter()
    RadzenComponent.RaiseMouseLeave()
    RadzenComponent.Dispose()
    RadzenComponent.CurrentStyle
    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

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

    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
    RadzenComponent.GetComponentCssClass()

    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

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

    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".

    OnInitialized()

    Called by the Blazor runtime.

    Declaration
    protected override void OnInitialized()
    Overrides
    RadzenComponent.OnInitialized()

    Refresh()

    Refreshes this instance.

    Declaration
    public void Refresh()

    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
    Overrides
    RadzenComponent.SetParametersAsync(ParameterView)

    Implements

    IDisposable

    Introducing Radzen Blazor Studio

    Radzen Blazor Studio is a software development environment that empowers developers to design, build and deploy Blazor applications without the traditional hurdles. Write less code and get more done.

    Learn More

    Download Now
    Download Now
    In This Article
    Back to top Radzen Blazor Components, © 2018-2025 Radzen. Source Code licensed under MIT