Unplanned
Last Updated: 02 Dec 2026 12:26 by ADMIN
Lisa
Created on: 02 Dec 2026 12:19
Category: DockManager
Type: Bug Report
1
Pane Size is persisted incorrectly after dragging a sibling pane and height can become width

When every pane but one is dragged out of a DockManagerSplitPane, the DockManager removes the split pane and moves the remaining pane up into the split pane's parent. That pane keeps its Size, but the size was relative to the removed split pane's orientation.

If the removed split pane was vertical and its parent is horizontal, the remaining pane's height percentage becomes its width percentage. In the example below, Pane A is 80% of the left column's height. After Pane B is dragged out, Pane A becomes 80% of the whole DockManager's width.

The same happens with split panes the DockManager creates while you drag. Docking a pane above or below Pane A creates a vertical split where each pane gets 50%. Dragging that pane out again leaves Pane A at 50% of the DockManager's width.

The wrong size is also in the state returned by GetState() and OnStateChanged, so a saved layout keeps it too.

Steps to reproduce (scenario 1)

Run the page below.
Drag "Pane B" out of the left column and dock it in the center (for example to the right of "Editor"), or float it.
Click "Show state".

Expected: Pane A takes the place of the removed left split pane at that pane's width (20%).

Actual: Pane A becomes 80% of the DockManager's width, and its Size in the state is still 80%.

Steps to reproduce (scenario 2)

After scenario 1, drag "Preview" and dock it below "Pane A". The DockManager creates a vertical split and gives both panes 50%.
Drag "Preview" out again and dock it to the right of "Editor".

Expected: Pane A gets the width of the removed split pane.

Actual: Pane A becomes 50% of the DockManager's width.

Suggested fix: when a split pane is removed and its last child moves up into the split pane's parent, give that child the removed split pane's Size.

Test Page:

@using System.Text.Json

<TelerikButton OnClick="@ShowState">Show state</TelerikButton>

<TelerikDockManager @ref="_dockManager" Height="600px" OnStateChanged="@OnStateChanged">
    <DockManagerPanes>
        <DockManagerSplitPane Orientation="@DockManagerPaneOrientation.Horizontal" @bind-Size="@LeftSplitPaneSize">
            <Panes>
                <DockManagerSplitPane Id="left-split" Orientation="@DockManagerPaneOrientation.Vertical">
                    <Panes>
                        <DockManagerContentPane Id="pane-a" HeaderText="Pane A" @bind-Size="@PaneASize">
                            <Content>Pane A - 80% of the left column's height</Content>
                        </DockManagerContentPane>
                        <DockManagerContentPane Id="pane-b" HeaderText="Pane B" @bind-Size="@PaneBSize">
                            <Content>Pane B - drag me out of the left column</Content>
                        </DockManagerContentPane>
                    </Panes>
                </DockManagerSplitPane>

                <DockManagerContentPane Id="editor" HeaderText="Editor" @bind-Size="@EditorPaneSize">
                    <Content>Editor</Content>
                </DockManagerContentPane>

                <DockManagerContentPane Id="preview" HeaderText="Preview" @bind-Size="@PreviewPaneSize">
                    <Content>Preview</Content>
                </DockManagerContentPane>
            </Panes>
        </DockManagerSplitPane>
    </DockManagerPanes>
</TelerikDockManager>

<pre>@_stateJson</pre>

@code {
    private string EditorPaneSize { get; set; } = "40%";
    private string PreviewPaneSize { get; set; } = "40%";
    private string LeftSplitPaneSize { get; set; } = "20%";
    private string PaneASize { get; set; } = "80%";
    private string PaneBSize { get; set; } = "20%";

    private TelerikDockManager _dockManager = default!;
    private string _stateJson = string.Empty;

    private void OnStateChanged(DockManagerStateEventArgs args)
    {
        _stateJson = Serialize(args.DockManagerState);
    }

    private void ShowState()
    {
        _stateJson = Serialize(_dockManager.GetState());
    }

    private static string Serialize(DockManagerState state)
    {
        return JsonSerializer.Serialize(state, new JsonSerializerOptions { WriteIndented = true });
    }
}

1 comment
ADMIN
Dimo
Posted on: 02 Dec 2026 12:26

Hello Lisa,

Indeed, the described behavior is a bug, thanks for reporting! On a side note, here are two related comments:

  • There is no need to define explicit Sizes to all sibling panes. You can leave one pane without a Size, which may also mitigate the problem if the Size-less pane is the last one that remains undragged. For example, you can remove @bind-Size="@LeftSplitPaneSize" and @bind-Size="@PaneASize" and the unexpected resizing in test scenario 1 will no longer occur.
  • When setting the Size parameter, use two-way binding or SizeChanged, so that the parameter value can update as a result of user actions. Using a hard-coded literal like Size="40%" can produce unexpected size resetting on Blazor UI refresh. I applied this suggestion to your test page.

Regards,
Dimo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.