Skip to content

Commit 53f866b

Browse files
committed
docs(DockManager): Add missing UnpinnedSize and UnpinnedSizeChanged (#3026)
* docs(DockManager): Add missing UnpinnedSize and UnpinnedSizeChanged * Update events.md * polishing
1 parent 7368c55 commit 53f866b

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

components/dockmanager/events.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ This article explains the events available in the Telerik DockManager for Blazor
1616
* [OnUndock](#ondock)
1717
* [VisibleChanged](#visiblechanged)
1818
* [SizeChanged](#sizechanged)
19+
* [UnpinnedSizeChanged](#unpinnedsizechanged)
1920
* [OnPaneResize](#onpaneresize)
2021
* [State Events](#state-events)
2122
* [OnPin](#onpin)
@@ -53,9 +54,13 @@ The `VisibleChanged` event is fired when the user tries to hide a given pane. Yo
5354

5455
The `SizeChanged` event is triggered when the `Size` parameter of the corresponding pane is changed.
5556

57+
## UnpinnedSizeChanged
58+
59+
The `UnpinnedSizeChanged` event is triggered when the `UnpinnedSize` parameter of the corresponding pane is changed.
60+
5661
## OnPaneResize
5762

58-
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.
63+
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.
5964

6065
The event handler receives as an argument an `DockManagerPaneResizeEventArgs` object that contains:
6166

@@ -119,9 +124,13 @@ The event handler receives as an argument an `DockManagerUnpinEventArgs` object
119124
<DockManagerContentPane HeaderText="Pane 1"
120125
Id="Pane1"
121126
Size="50%"
127+
UnpinnedSize="@Pane1UnpinnedSize"
128+
UnpinnedSizeChanged="@Pane1UnpinnedSizeChanged"
122129
Closeable="false">
123130
<Content>
124131
Pane 1. Undocking is allowed. Docking over it is cancelled.
132+
<code>UnpinnedSizeChanged</code> is handled.
133+
Current <code>UnpinnedSize</code>: <strong>@Pane1UnpinnedSize</strong>
125134
</Content>
126135
</DockManagerContentPane>
127136
@@ -195,8 +204,9 @@ The event handler receives as an argument an `DockManagerUnpinEventArgs` object
195204
</div>
196205
197206
@code {
198-
private TelerikDockManager DockManagerRef { get; set; }
207+
private TelerikDockManager? DockManagerRef { get; set; }
199208
209+
private string Pane1UnpinnedSize { get; set; } = "360px";
200210
private bool Pane4Visible { get; set; } = true;
201211
private bool FloatingPaneVisible { get; set; } = true;
202212
@@ -246,6 +256,13 @@ The event handler receives as an argument an `DockManagerUnpinEventArgs` object
246256
DockManagetEventLog.Insert(0, $"Pane <strong>{args.PaneId}</strong> was resized to {args.Size}.");
247257
}
248258
259+
private void Pane1UnpinnedSizeChanged(string newUnpinnedSize)
260+
{
261+
Pane1UnpinnedSize = newUnpinnedSize;
262+
263+
DockManagetEventLog.Insert(0, $"Pane <strong>Pane 1</strong> was resized to {newUnpinnedSize} while unpinned.");
264+
}
265+
249266
private void OnPaneUnpin(DockManagerUnpinEventArgs args)
250267
{
251268
if (args.PaneId == "Pane4")
@@ -282,4 +299,4 @@ The event handler receives as an argument an `DockManagerUnpinEventArgs` object
282299

283300
## See Also
284301

285-
* [DockManager Overview](slug:dockmanager-overview)
302+
* [DockManager Overview](slug:dockmanager-overview)

components/dockmanager/overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ The following table lists the Dock Manager parameters. Also check the [DockManag
130130
| `Size` | `string` | Determines the size of the splitter pane. |
131131
| `Unpinnable` | `bool` <br /> (`false`) | Determines whether the pane can be unpinned. |
132132
| `Unpinned` | `bool` <br /> (`true`) | Determines whether the pane is unpinned. |
133+
| `UnpinnedSize` | `string` | Determines the size of the splitter pane when it is unpinned. |
133134
| `Visible` | `bool` <br /> (`true`) | Determines whether the tab/pane is rendered. |
134135

135136
### DockManagerSplitPane Parameters

0 commit comments

Comments
 (0)