diff --git a/components/dockmanager/events.md b/components/dockmanager/events.md index aba596d3ac..1ce9a6502f 100644 --- a/components/dockmanager/events.md +++ b/components/dockmanager/events.md @@ -16,6 +16,7 @@ This article explains the events available in the Telerik DockManager for Blazor * [OnUndock](#ondock) * [VisibleChanged](#visiblechanged) * [SizeChanged](#sizechanged) +* [UnpinnedSizeChanged](#unpinnedsizechanged) * [OnPaneResize](#onpaneresize) * [State Events](#state-events) * [OnPin](#onpin) @@ -53,9 +54,13 @@ The `VisibleChanged` event is fired when the user tries to hide a given pane. Yo The `SizeChanged` event is triggered when the `Size` parameter of the corresponding pane is changed. +## UnpinnedSizeChanged + +The `UnpinnedSizeChanged` event is triggered when the `UnpinnedSize` parameter of the corresponding pane is changed. + ## OnPaneResize -The `OnPaneResize` event is fired when any pane is resized. It lets you respond to that change if needed - for example, call the `.Refresh()` method of a chart or otherwise repaint a child component in the content. You can also use it to, for example, update the saved [state](slug:dockmanager-state) for your users. +The `OnPaneResize` event is fired when a pane is resized, except unpinned panes. It lets you respond to that change if needed - for example, call the `.Refresh()` method of a chart or otherwise repaint a child component in the content. You can also use it to, for example, update the saved [state](slug:dockmanager-state) for your users. The event handler receives as an argument an `DockManagerPaneResizeEventArgs` object that contains: @@ -119,9 +124,13 @@ The event handler receives as an argument an `DockManagerUnpinEventArgs` object Pane 1. Undocking is allowed. Docking over it is cancelled. + UnpinnedSizeChanged is handled. + Current UnpinnedSize: @Pane1UnpinnedSize @@ -195,8 +204,9 @@ The event handler receives as an argument an `DockManagerUnpinEventArgs` object @code { - private TelerikDockManager DockManagerRef { get; set; } + private TelerikDockManager? DockManagerRef { get; set; } + private string Pane1UnpinnedSize { get; set; } = "360px"; private bool Pane4Visible { get; set; } = true; private bool FloatingPaneVisible { get; set; } = true; @@ -246,6 +256,13 @@ The event handler receives as an argument an `DockManagerUnpinEventArgs` object DockManagetEventLog.Insert(0, $"Pane {args.PaneId} was resized to {args.Size}."); } + private void Pane1UnpinnedSizeChanged(string newUnpinnedSize) + { + Pane1UnpinnedSize = newUnpinnedSize; + + DockManagetEventLog.Insert(0, $"Pane Pane 1 was resized to {newUnpinnedSize} while unpinned."); + } + private void OnPaneUnpin(DockManagerUnpinEventArgs args) { if (args.PaneId == "Pane4") @@ -282,4 +299,4 @@ The event handler receives as an argument an `DockManagerUnpinEventArgs` object ## See Also -* [DockManager Overview](slug:dockmanager-overview) \ No newline at end of file +* [DockManager Overview](slug:dockmanager-overview) diff --git a/components/dockmanager/overview.md b/components/dockmanager/overview.md index 64eb0507e6..bfa6c429c2 100644 --- a/components/dockmanager/overview.md +++ b/components/dockmanager/overview.md @@ -130,6 +130,7 @@ The following table lists the Dock Manager parameters. Also check the [DockManag | `Size` | `string` | Determines the size of the splitter pane. | | `Unpinnable` | `bool`
(`false`) | Determines whether the pane can be unpinned. | | `Unpinned` | `bool`
(`true`) | Determines whether the pane is unpinned. | +| `UnpinnedSize` | `string` | Determines the size of the splitter pane when it is unpinned. | | `Visible` | `bool`
(`true`) | Determines whether the tab/pane is rendered. | ### DockManagerSplitPane Parameters