Skip to content

Commit f1c8a54

Browse files
Tsvetomir-HrTsvetomir-Hr
authored andcommitted
chore(DockManager): polish article
1 parent 5c93cae commit f1c8a54

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

knowledge-base/dockmanager-reset-state.md

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,18 @@ ticketid: 1691957
1111
---
1212

1313
## Environment
14-
1514
<table>
16-
<tbody>
17-
<tr>
18-
<td>Product</td>
19-
<td>DockManager for Blazor</td>
20-
</tr>
21-
<tr>
22-
<td>Version</td>
23-
<td>Current</td>
24-
</tr>
25-
</tbody>
15+
<tbody>
16+
<tr>
17+
<td>Product</td>
18+
<td>DockManager for Blazor</td>
19+
</tr>
20+
</tbody>
2621
</table>
2722

2823
## Description
2924

30-
I want to reset the state of the [DockManager](slug:dockmanager-overrview) in Blazor on a button click. The DockManager currently only resets by reloading the page. I need a solution to reset its state dynamically.
25+
I want to reset the state of the [DockManager](slug:dockmanager-overview) component on a button click. The DockManager currently only resets by reloading the page. I need a solution to reset its state dynamically.
3126

3227
This knowledge base article also answers the following questions:
3328
- How to reset DockManager layout to its default state?
@@ -49,7 +44,7 @@ To reset the DockManager state dynamically on a button click:
4944
<br />
5045
<br />
5146
<TelerikButton OnClick="@ResetDockState" ThemeColor="@ThemeConstants.Button.ThemeColor.Primary">Reset Dock State</TelerikButton>
52-
<TelerikDockManager @ref="DockManager"
47+
<TelerikDockManager @ref="@DockManagerRef"
5348
Height="600px">
5449
<DockManagerPanes>
5550
<DockManagerSplitPane>
@@ -118,19 +113,19 @@ To reset the DockManager state dynamically on a button click:
118113
</TelerikDockManager>
119114
120115
@code {
121-
private TelerikDockManager? DockManager { get; set; }
116+
private TelerikDockManager? DockManagerRef { get; set; }
122117
private DockManagerState? DefaultState { get; set; }
123118
124119
protected override async Task OnAfterRenderAsync(bool firstRender)
125120
{
126121
if (firstRender)
127122
{
128-
DefaultState = DockManager?.GetState();
123+
DefaultState = DockManagerRef?.GetState();
129124
}
130125
}
131126
private void ResetDockState()
132127
{
133-
DockManager?.SetState(DefaultState);
128+
DockManagerRef?.SetState(DefaultState);
134129
}
135130
}
136131
````

0 commit comments

Comments
 (0)