Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions components/dockmanager/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a `DockManagerPaneResizeEventArgs` object


Expand Down Expand Up @@ -119,9 +124,13 @@ The event handler receives as an argument an `DockManagerUnpinEventArgs` object
<DockManagerContentPane HeaderText="Pane 1"
Id="Pane1"
Size="50%"
UnpinnedSize="@Pane1UnpinnedSize"
UnpinnedSizeChanged="@Pane1UnpinnedSizeChanged"
Closeable="false">
<Content>
Pane 1. Undocking is allowed. Docking over it is cancelled.
<code>UnpinnedSizeChanged</code> is handled.
Current <code>UnpinnedSize</code>: <strong>@Pane1UnpinnedSize</strong>
</Content>
</DockManagerContentPane>
Expand Down Expand Up @@ -195,8 +204,9 @@ The event handler receives as an argument an `DockManagerUnpinEventArgs` object
</div>
@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;
Expand Down Expand Up @@ -246,6 +256,13 @@ The event handler receives as an argument an `DockManagerUnpinEventArgs` object
DockManagetEventLog.Insert(0, $"Pane <strong>{args.PaneId}</strong> was resized to {args.Size}.");
}
private void Pane1UnpinnedSizeChanged(string newUnpinnedSize)
{
Pane1UnpinnedSize = newUnpinnedSize;
DockManagetEventLog.Insert(0, $"Pane <strong>Pane 1</strong> was resized to {newUnpinnedSize} while unpinned.");
}
private void OnPaneUnpin(DockManagerUnpinEventArgs args)
{
if (args.PaneId == "Pane4")
Expand Down Expand Up @@ -282,4 +299,4 @@ The event handler receives as an argument an `DockManagerUnpinEventArgs` object

## See Also

* [DockManager Overview](slug:dockmanager-overview)
* [DockManager Overview](slug:dockmanager-overview)
1 change: 1 addition & 0 deletions components/dockmanager/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` <br /> (`false`) | Determines whether the pane can be unpinned. |
| `Unpinned` | `bool` <br /> (`true`) | Determines whether the pane is unpinned. |
| `UnpinnedSize` | `string` | Determines the size of the splitter pane when it is unpinned. |
| `Visible` | `bool` <br /> (`true`) | Determines whether the tab/pane is rendered. |

### DockManagerSplitPane Parameters
Expand Down