New to Telerik UI for BlazorStart a free 30-day trial

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:

C#
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.InvokeVoidAsyncWithoutAwait(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

Enables the registration of WebMCP tools for this PanelBar instance. When set to true, the PanelBar expand and collapse operations are exposed as tools discoverable by AI models through the browser. Default value is false.

C#
[Parameter]
public bool EnableWebMcpTools { get; set; }

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.

C#
[Parameter]
public IEnumerable<object> ExpandedItems { get; set; }

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.

C#
[Parameter]
public EventCallback<IEnumerable<object>> ExpandedItemsChanged { get; set; }

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.

C#
[Parameter]
public PanelBarExpandMode ExpandMode { get; set; }

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

C#
[Parameter]
public EventCallback<PanelBarCollapseEventArgs> OnCollapse { get; set; }

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

C#
[Parameter]
public EventCallback<PanelBarExpandEventArgs> OnExpand { get; set; }

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

C#
[Parameter]
public EventCallback<PanelBarItemClickEventArgs> OnItemClick { get; set; }

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

C#
[Parameter]
public Action<PanelBarItemRenderEventArgs> OnItemRender { get; set; }

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

C#
[Parameter]
public RenderFragment PanelBarBindings { get; set; }

Provides configuration for WebMCP tools, such as a Name to distinguish this PanelBar from others on the same page.

C#
[Parameter]
public RenderFragment PanelBarSettings { get; set; }

Methods

C#
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters:__builderRenderTreeBuilder

Overrides: ComponentBase.BuildRenderTree(RenderTreeBuilder)

C#
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters:firstRenderboolReturns:

Task

Overrides: BaseComponent.OnAfterRenderAsync(bool)

C#
protected override void OnParametersSet()

Overrides: ComponentBase.OnParametersSet()

C#
public override Task SetParametersAsync(ParameterView parameters)
Parameters:parametersParameterViewReturns:

Task

Overrides: DataBoundComponent<object>.SetParametersAsync(ParameterView)