Telerik ExpansionPanel component for Blazor applications, providing a collapsible container with customizable header and content. Use this component to organize content into expandable sections and improve page structure, readability, and space efficiency.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class TelerikExpansionPanel : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseBaseComponentTelerikExpansionPanel
Implements:
Inherited Members
Constructors
public TelerikExpansionPanel()
Properties
Sets the animation duration in milliseconds. Default is 300.
[Parameter]
public int AnimationDuration { get; set; }
The content of the expansion panel.
[Parameter]
public RenderFragment? ChildContent { get; set; }
The icon to be displayed when the expansion panel is expanded.
[Parameter]
public object? CollapseIcon { get; set; }
The content of the expansion panel. Takes precedence over the ChildContent parameter.
[Parameter]
public RenderFragment? Content { get; set; }
Indicates whether the expansion panel is enabled. If set to false, the expansion panel will be disabled and not respond to user interactions.
[Parameter]
public bool Enabled { get; set; }
Indicates whether the initial state of the expansion panel is expanded.
[Parameter]
public bool Expanded { get; set; }
Fires when the expansion panel changes its expanded state.
[Parameter]
public EventCallback<bool> ExpandedChanged { get; set; }
The icon to be displayed when the expansion panel is collapsed.
[Parameter]
public object? ExpandIcon { get; set; }
The unique identifier of the expansion panel.
[Parameter]
public string? Id { get; set; }
The subtitle of the expansion panel.
[Parameter]
public string? SubTitle { get; set; }
The custom subtitle content of the expansion panel. Takes precedence over the SubTitle parameter.
[Parameter]
public RenderFragment? SubTitleTemplate { get; set; }
The custom title content of the expansion panel. Takes precedence over the Title parameter.
[Parameter]
public RenderFragment? TitleTemplate { get; set; }
Indicates whether the expansion panel is toggleable. If set to false, the expansion panel will not respond to user interactions.
[Parameter]
public bool Toggleable { get; set; }
Methods
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Overrides:
public override void Dispose()
Overrides:
Toggles the expansion state of the panel. If the panel is currently expanded, it will collapse; if it is collapsed, it will expand.