Class
TelerikPanelBar

Telerik PanelBar component for Blazor applications, providing an interactive hierarchical navigation interface with expandable/collapsible panels. Use this component to create organized content sections, navigation menus, or data exploration interfaces where users need to view nested information in a structured, space-efficient layout with accordion-style or multi-panel behavior.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

cs-api-definition
public class TelerikPanelBar : DataBoundComponent<object>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentDataBoundComponent<object>TelerikPanelBar

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members DataBoundComponent<object>.OnParametersSetAsync()DataBoundComponent<object>.Dispose()DataBoundComponent<object>.Rebind()DataBoundComponent<object>.DataBaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnInitialized()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)

Properties

ExpandMode

Controls how many panel items can be expanded simultaneously. "PanelBarExpandMode.Single" allows only one item to be expanded at a time, automatically collapsing others when a new item is expanded. "PanelBarExpandMode.Multiple" allows multiple items to remain expanded simultaneously, giving users full control over the panel state.

Declaration

cs-api-definition
[Parameter]
public PanelBarExpandMode ExpandMode { get; set; }

Property Value

PanelBarExpandMode

ExpandedItems

Specifies which data items are currently expanded in the PanelBar. Bind this to a collection of data objects to programmatically control or track which panel items are expanded. Works together with "ExpandedItemsChanged" for two-way binding. Use with "ExpandMode" to control expansion behavior. When "ExpandMode" is "PanelBarExpandMode.Single", only one item per hierarchical level will remain expanded.

Declaration

cs-api-definition
[Parameter]
public IEnumerable<object> ExpandedItems { get; set; }

Property Value

IEnumerable<object>

ExpandedItemsChanged

Fires when the collection of expanded items changes due to user interaction or programmatic updates. Use this event callback to implement two-way binding with "ExpandedItems" for tracking panel expansion state. The event provides the updated collection of expanded data items after expand/collapse operations.

Declaration

cs-api-definition
[Parameter]
public EventCallback<IEnumerable<object>> ExpandedItemsChanged { get; set; }

Property Value

EventCallback<IEnumerable<object>>

OnCollapse

Fires when a PanelBar item is collapsed by user interaction or programmatic action. Use this event to implement custom logic when items are closed, such as cleanup operations or state management. The event provides details about the collapsed item through "PanelBarCollapseEventArgs".

Declaration

cs-api-definition
[Parameter]
public EventCallback<PanelBarCollapseEventArgs> OnCollapse { get; set; }

Property Value

EventCallback<PanelBarCollapseEventArgs>

OnExpand

Fires when a PanelBar item is expanded by user interaction or programmatic action. Use this event to implement custom logic when items are opened, such as loading additional data or tracking user behavior. The event provides details about the expanded item through "PanelBarExpandEventArgs".

Declaration

cs-api-definition
[Parameter]
public EventCallback<PanelBarExpandEventArgs> OnExpand { get; set; }

Property Value

EventCallback<PanelBarExpandEventArgs>

OnItemClick

Fires when a user clicks on a PanelBar item header or content area. Use this event to respond to item selection, implement custom navigation logic, or trigger application-specific actions. The event provides access to the clicked data item through "PanelBarItemClickEventArgs".

Declaration

cs-api-definition
[Parameter]
public EventCallback<PanelBarItemClickEventArgs> OnItemClick { get; set; }

Property Value

EventCallback<PanelBarItemClickEventArgs>

OnItemRender

Fires during the rendering of each PanelBar item, allowing you to apply custom CSS classes or styling based on the data item. Use this event to conditionally style items, add visual indicators, or apply business logic-based appearance changes. Provides access to the item data and rendering context through "PanelBarItemRenderEventArgs".

Declaration

cs-api-definition
[Parameter]
public Action<PanelBarItemRenderEventArgs> OnItemRender { get; set; }

Property Value

Action<PanelBarItemRenderEventArgs>

PanelBarBindings

Configures data binding settings for hierarchical data structures by specifying field names and templates for each level. Use this to map data properties to PanelBar item properties such as text, icon, URL, and disabled state. Children: "PanelBarBinding".

Declaration

cs-api-definition
[Parameter]
public RenderFragment PanelBarBindings { get; set; }

Property Value

RenderFragment

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

cs-api-definition
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

OnAfterRenderAsync(bool)

Declaration

cs-api-definition
protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender

bool

Returns

Task

Overrides BaseComponent.OnAfterRenderAsync(bool)

OnParametersSet()

Declaration

cs-api-definition
protected override void OnParametersSet()

Overrides ComponentBase.OnParametersSet()

SetParametersAsync(ParameterView)

Declaration

cs-api-definition
public override Task SetParametersAsync(ParameterView parameters)

Parameters

parameters

ParameterView

Returns

Task

Overrides DataBoundComponent<object>.SetParametersAsync(ParameterView)