Skip to content

Commit 652f9e3

Browse files
docs(DockManager): add dockmanager documentation
1 parent 7d3c046 commit 652f9e3

File tree

8 files changed

+1037
-0
lines changed

8 files changed

+1037
-0
lines changed
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
---
2+
title: Dock Types
3+
page_title: DockManager - Dock Types
4+
description: Dock Types in the DockManager for Blazor.
5+
slug: dockmanager-dock-types
6+
tags: telerik,blazor,dockmanager,dock,types
7+
published: true
8+
position: 10
9+
---
10+
11+
# Docking Panes
12+
13+
The Blazor DockManager component exposes the ability to dock globally or within other panes.
14+
15+
## Docking Types
16+
17+
### Global Docking
18+
19+
When a user drags a pane, a global docking navigator always appears. This allows the user to dock the pane to one of the component's edges, making it a root pane.
20+
21+
### Inner Docking
22+
23+
When a user drags a pane and hovers over another pane, a dock navigator for that pane appears. The user can then choose to:
24+
25+
* Drop the pane on any of the parent pane’s outer edges, splitting it.
26+
* Drop it in the center of the navigator to add it as a tab within the parent pane.
27+
28+
## Disable Docking over Individual Panes
29+
30+
To disable docking over a specific pane, set its `Dockable` parameter to `false`.
31+
32+
>caption DockManager with disabled docking option over some panes.
33+
34+
`````RAZOR
35+
<TelerikDockManager>
36+
<DockManagerPanes>
37+
38+
<DockManagerContentPane Dockable="false">
39+
<HeaderTemplate>
40+
Customer Support
41+
</HeaderTemplate>
42+
<Content>
43+
<ul>
44+
<li>Inbox</li>
45+
<li>Open Tickets</li>
46+
<li>Reports</li>
47+
<li>Settings</li>
48+
</ul>
49+
</Content>
50+
</DockManagerContentPane>
51+
52+
<DockManagerSplitPane Dockable="false">
53+
<Panes>
54+
55+
<DockManagerContentPane>
56+
<HeaderTemplate>
57+
<strong>Open Tickets</strong>
58+
</HeaderTemplate>
59+
<Content>
60+
<ul>
61+
<li>Ticket #1245 - Payment issue</li>
62+
<li>Ticket #1246 - Login failure</li>
63+
<li>Ticket #1247 - Refund request</li>
64+
</ul>
65+
</Content>
66+
</DockManagerContentPane>
67+
68+
<DockManagerContentPane>
69+
<HeaderTemplate>
70+
<strong>Recent Interactions</strong>
71+
</HeaderTemplate>
72+
<Content>
73+
<p>John Doe: "I need help with my subscription."</p>
74+
<p>Jane Smith: "My order hasn’t arrived yet."</p>
75+
<p>Michael Lee: "How do I reset my password?"</p>
76+
</Content>
77+
</DockManagerContentPane>
78+
79+
</Panes>
80+
</DockManagerSplitPane>
81+
82+
<DockManagerSplitPane>
83+
<Panes>
84+
<DockManagerTabGroupPane>
85+
<Panes>
86+
87+
<DockManagerContentPane>
88+
<HeaderTemplate>
89+
<strong>Analytics</strong>
90+
</HeaderTemplate>
91+
<Content>
92+
<p>Overview of ticket resolution time, customer satisfaction, and response rates.</p>
93+
</Content>
94+
</DockManagerContentPane>
95+
96+
<DockManagerContentPane>
97+
<HeaderTemplate>
98+
<strong>Team Performance</strong>
99+
</HeaderTemplate>
100+
<Content>
101+
<p>Live statistics on agent response times and workload distribution.</p>
102+
</Content>
103+
</DockManagerContentPane>
104+
105+
</Panes>
106+
</DockManagerTabGroupPane>
107+
108+
<DockManagerContentPane>
109+
<HeaderTemplate>
110+
<strong>System Alerts</strong>
111+
</HeaderTemplate>
112+
<Content>
113+
<p>New feature rollout scheduled for February 15.</p>
114+
<p>Service downtime reported in Europe region.</p>
115+
<p>Security update required for agent login system.</p>
116+
</Content>
117+
</DockManagerContentPane>
118+
119+
</Panes>
120+
</DockManagerSplitPane>
121+
</DockManagerPanes>
122+
123+
<DockManagerFloatingPanes>
124+
<DockManagerSplitPane>
125+
<Panes>
126+
127+
<DockManagerContentPane>
128+
<HeaderTemplate>
129+
<strong>Live Chat</strong>
130+
</HeaderTemplate>
131+
<Content>
132+
<p>Instant messaging with support team members.</p>
133+
<TelerikTextBox @bind-Value="Message"></TelerikTextBox>
134+
</Content>
135+
</DockManagerContentPane>
136+
137+
</Panes>
138+
</DockManagerSplitPane>
139+
</DockManagerFloatingPanes>
140+
</TelerikDockManager>
141+
142+
@code {
143+
private string Message { get; set; }
144+
}
145+
`````

components/dockmanager/events.md

Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
---
2+
title: Events
3+
page_title: DockManager - Events
4+
description: Events in the DockManager for Blazor.
5+
slug: dockmanager-events
6+
tags: telerik,blazor,dockmanager,events
7+
published: true
8+
position: 20
9+
---
10+
11+
# DockManager Events
12+
13+
This article explains the events available in the Telerik DockManager for Blazor:
14+
15+
* [OnDock](#ondock)
16+
* [OnUndock](#ondock)
17+
* [OnPaneResize](#onpaneresize)
18+
* [State Events](#state-events)
19+
* [OnPin](#onpin)
20+
* [OnUnpin](#onunpin)
21+
22+
## OnDock
23+
24+
The `OnDock` event is fired when any pane is docked.
25+
26+
The event handler receives as an argument an `DockManagerDockEventArgs` object that contains:
27+
28+
| Property | Type | Description |
29+
|---|---|---|
30+
| `DockPosition` | `DockManagerDockPosition` | The position where the pane is being docked. The possible options are: `Left`, `Right`, `Top`, `Bottom`, `Middle`. |
31+
| `IsCancelled` | `bool` <br /> (`false`) | Set the `IsCancelled` property to `true` to cancel the event. |
32+
| `PaneId` | `string` | The Id of the floating pane that is being docked. |
33+
| `TargetPaneId` | `string` | The Id of the target pane. |
34+
35+
## OnUndock
36+
37+
The `OnUndock` event is fired when any pane is undocked.
38+
39+
The event handler receives as an argument an `DockManagerUndockEventArgs` object that contains:
40+
41+
| Property | Type | Description |
42+
|---|---|---|
43+
| `IsCancelled` | `bool` <br /> (`false`) | Set the `IsCancelled` property to `true` to cancel the event. |
44+
| `PaneId` | `string` | The Id of the floating pane that is being undocked. |
45+
46+
## OnPaneResize
47+
48+
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.
49+
50+
The event handler receives as an argument an `DockManagerPaneResizeEventArgs` object that contains:
51+
52+
| Property | Type | Description |
53+
|---|---|---|
54+
| `PaneId` | `string` | The Id of the pane that is being resized. |
55+
| `Size` | `string` | The new size of the resized pane. |
56+
57+
## State Events
58+
59+
The DockManager state lets you control through code the aspects of the DockManager the user can control in the UI - such as docking, undocking, resizing panes and etc. The DockManager provides two events related to the state:
60+
61+
* `OnStateInit` - fires when the DockManager initializes so you can provide a stored version of the grid.
62+
63+
* `OnStateChanged` - fires when the user performs an action so you can see what area was changed and, if needed, alter the component state.
64+
65+
Review the [DockManager state](slug://dockmanager-state) article for more details and examples on how the grid state works and what you can do with it.
66+
67+
## OnPin
68+
69+
The `OnPin` event is fired when any pane is pinned.
70+
71+
The event handler receives as an argument an `DockManagerPinEventArgs` object that contains:
72+
73+
| Property | Type | Description |
74+
|---|---|---|
75+
| `IsCancelled` | `bool` <br /> (`false`) | Set the `IsCancelled` property to `true` to cancel the event. |
76+
| `PaneId` | `string` | The Id of the pane that is being pinned. |
77+
78+
## OnUnpin
79+
80+
The `OnUnpin` event is fired when any pane is unpinned.
81+
82+
The event handler receives as an argument an `DockManagerUnpinEventArgs` object that contains:
83+
84+
| Property | Type | Description |
85+
|---|---|---|
86+
| `IsCancelled` | `bool` <br /> (`false`) | Set the `IsCancelled` property to `true` to cancel the event. |
87+
| `PaneId` | `string` | The Id of the pane that is being unpinned. |
88+
89+
## Example
90+
91+
>caption DockManager with all available events.
92+
93+
`````RAZOR
94+
<strong>The events log is below the component.</strong>
95+
96+
<TelerikDockManager Height="800px"
97+
Width="90%"
98+
OnDock="@OnPaneDock"
99+
OnUndock="@OnPaneUndock"
100+
OnPin="@OnPanePin"
101+
OnPaneResize="@OnPaneResize"
102+
OnUnpin="@OnPaneUnpin">
103+
<DockManagerPanes>
104+
<DockManagerSplitPane AllowEmpty="true">
105+
<Panes>
106+
<DockManagerContentPane HeaderText="Task Details"
107+
Id="taskDetails">
108+
<Content>
109+
This pane displays task details like description, assignee, and status.
110+
Task 1: Update website UI
111+
</Content>
112+
</DockManagerContentPane>
113+
<DockManagerContentPane HeaderText="Assigned To"
114+
Id="assignedTo">
115+
<Content>
116+
This pane shows which team members are assigned to the tasks.
117+
Team Member: John Doe
118+
</Content>
119+
</DockManagerContentPane>
120+
<DockManagerContentPane HeaderText="Due Date"
121+
Id="dueDate">
122+
<Content>
123+
This pane contains the task deadline and the progress bar.
124+
Due Date: 03/20/2025
125+
</Content>
126+
</DockManagerContentPane>
127+
<DockManagerTabGroupPane>
128+
<Panes>
129+
<DockManagerContentPane HeaderText="Comments"
130+
Id="comments">
131+
<Content>
132+
This pane allows team members to leave comments and feedback.
133+
Comment: "Looks good, but needs more details."
134+
</Content>
135+
</DockManagerContentPane>
136+
<DockManagerContentPane HeaderText="Attachments"
137+
Id="attachments">
138+
<Content>
139+
This pane shows files attached to the task, such as documents and screenshots.
140+
Attachment: Project_Mockup.pdf
141+
</Content>
142+
</DockManagerContentPane>
143+
</Panes>
144+
</DockManagerTabGroupPane>
145+
</Panes>
146+
</DockManagerSplitPane>
147+
</DockManagerPanes>
148+
149+
<DockManagerFloatingPanes>
150+
<DockManagerSplitPane>
151+
<Panes>
152+
<DockManagerContentPane>
153+
<HeaderTemplate>
154+
<strong>Live Updates</strong>
155+
</HeaderTemplate>
156+
<Content>
157+
Displays real-time progress updates on the task.
158+
Task 1 - 50% Completed
159+
</Content>
160+
</DockManagerContentPane>
161+
</Panes>
162+
</DockManagerSplitPane>
163+
</DockManagerFloatingPanes>
164+
</TelerikDockManager>
165+
166+
<div class="col">
167+
@((MarkupString)Log)
168+
</div>
169+
170+
@code {
171+
private string Log { get; set; }
172+
173+
private void OnPaneDock(DockManagerDockEventArgs args)
174+
{
175+
if (args.TargetPaneId == "taskDetails")
176+
{
177+
args.IsCancelled = true;
178+
Log += $"<br /> Task pane with ID {args.PaneId} was about to dock to task pane with ID {args.TargetPaneId}. The event is cancelled.";
179+
}
180+
else
181+
{
182+
Log += $"<br /> Task pane with ID {args.PaneId} was docked to task pane with ID {args.TargetPaneId}.";
183+
}
184+
}
185+
186+
private void OnPaneUndock(DockManagerUndockEventArgs args)
187+
{
188+
if (args.PaneId == "assignedTo")
189+
{
190+
args.IsCancelled = true;
191+
Log += $"<br /> Task pane with ID {args.PaneId} was about to undock. The event is cancelled.";
192+
}
193+
else
194+
{
195+
Log += $"<br /> Task pane with ID {args.PaneId} was undocked.";
196+
}
197+
}
198+
199+
private void OnPanePin(DockManagerPinEventArgs args)
200+
{
201+
if (args.PaneId == "dueDate")
202+
{
203+
args.IsCancelled = true;
204+
Log += $"<br /> Task pane with ID {args.PaneId} was about to pin. The event is cancelled.";
205+
}
206+
else
207+
{
208+
Log += $"<br /> Task pane with ID {args.PaneId} was pinned.";
209+
}
210+
}
211+
212+
private void OnPaneResize(DockManagerPaneResizeEventArgs args)
213+
{
214+
Log += $"<br /> Task pane with ID {args.PaneId} was resized. The new size is {args.Size}.";
215+
}
216+
217+
private void OnPaneUnpin(DockManagerUnpinEventArgs args)
218+
{
219+
if (args.PaneId == "comments")
220+
{
221+
args.IsCancelled = true;
222+
Log += $"<br /> Task pane with ID {args.PaneId} was about to unpin. The event is cancelled.";
223+
}
224+
else
225+
{
226+
Log += $"<br /> Task pane with ID {args.PaneId} was unpinned.";
227+
}
228+
}
229+
}
230+
`````
231+
232+
## Next Steps
233+
234+
* [Manage the Dock Manager state](slug://dockmanager-state).
235+
236+
237+
## See Also
238+
239+
* [DockManager Overview](slug://dockmanager-overview)

0 commit comments

Comments
 (0)