Skip to content

Commit a1f9e28

Browse files
authored
Update events.md
1 parent 1ce948b commit a1f9e28

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

components/dockmanager/events.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ This article explains the events available in the Telerik DockManager for Blazor
1515
* [OnDock](#ondock)
1616
* [OnUndock](#ondock)
1717
* [VisibleChanged](#visiblechanged)
18+
* [UnpinnedSizeChanged](#unpinnedsizechanged)
1819
* [SizeChanged](#sizechanged)
1920
* [OnPaneResize](#onpaneresize)
2021
* [State Events](#state-events)
@@ -49,6 +50,10 @@ The event handler receives as an argument an `DockManagerUndockEventArgs` object
4950

5051
The `VisibleChanged` event is fired when the user tries to hide a given pane. You can effectively cancel the event by not propagating the new visibility state to the variable the `Visible` property is bound to. This is the way to cancel the event and keep the pane visible.
5152

53+
## UnpinnedSizeChanged
54+
55+
The `UnpinnedSizeChanged` event is triggered when the `UnpinnedSize` parameter of the corresponding pane is changed.
56+
5257
## SizeChanged
5358

5459
The `SizeChanged` event is triggered when the `Size` parameter of the corresponding pane is changed.
@@ -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,11 @@ 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+
249264
private void OnPaneUnpin(DockManagerUnpinEventArgs args)
250265
{
251266
if (args.PaneId == "Pane4")
@@ -282,4 +297,4 @@ The event handler receives as an argument an `DockManagerUnpinEventArgs` object
282297

283298
## See Also
284299

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

0 commit comments

Comments
 (0)