New to Telerik UI for Blazor? Download Free 30-day trial
DockManager - Dynamic Panes
- EXAMPLE
- VIEW SOURCE
- EDIT IN TELERIK REPL
- Change Theme
default
- Dynamic-panes.razor
Description
The Telerik UI for Blazor DockManager allows you to dynamically control pane visibility at runtime. This demo demonstrates how to show and hide individual panes using the Visible parameter on DockManagerContentPane, while the layout automatically adjusts to fill or release the freed space.
The sidebar panel provides toggle switches for each pane — Explorer, Output, Properties, and Search. Switching a pane off hides it from the layout; switching it back on restores it. When AllowEmpty is disabled, the containing DockManagerSplitPane collapses automatically when its last visible child is hidden, preventing empty regions. When AllowEmpty is enabled, the split container remains visible even with no children, which is useful for reserving layout space as a drop target.
The Reset button restores the DockManager to its original layout — including pane sizes, positions, and visibility — by capturing the initial state via the OnStateInit event and reapplying it with SetState.