Skip to content

Commit 699e424

Browse files
Tsvetomir-Hrdimodi
andauthored
Update knowledge-base/window-center-programmatically.md
Co-authored-by: Dimo Dimov <[email protected]>
1 parent ae5b283 commit 699e424

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

knowledge-base/window-center-programmatically.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ This knowledge base article answers the following questions:
3232

3333
To center a Telerik Window programmatically, follow these steps:
3434

35-
1. Bind the [`Top` and `Left` parameters](slug:components/window/position#top-and-left) using `@bind-Top` and `@bind-Left` to control the Window position dynamically. Set their default values to specific ones (e.g., `Top="30%"`, `Left="60%"`) to position the Window where you want it to appear initially.
36-
2. Set both parameters to `string.Empty` to reset the Window position. This will ensure that, the component automatically repositions itself to the center of the current viewport.
37-
3. Refresh the Window using component reference – Calling [`WindowRef?.Refresh();`](slug:window-overview#window-reference-and-methods) re-renders the Window with the new position.
35+
1. Set the [`Top` and `Left` parameters](slug:components/window/position#top-and-left) using `@bind-Top` and `@bind-Left` or the [`TopChanged` and `LeftChanged` events](slug:window-events#leftchanged-and-topchanged).
36+
2. Set both parameters to `string.Empty` to center the Window initially or any time afterwards.
37+
3. [Call the `Refresh()` method of the Window component instance](slug:window-overview#window-reference-and-methods) to re-render the Window at the new position.
3838

3939
>caption Center the Telerik Blazor Window Programmatically
4040

0 commit comments

Comments
 (0)