Skip to content

Commit 262cc2a

Browse files
committed
chore: apply requested changes
1 parent d5ff9ab commit 262cc2a

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

components/window/position.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ The Window offers several ways to control its position:
1717
* [Centered Window](#center)
1818
* [Positions Example](#example)
1919

20-
The Window renders [in the root of the application](slug:window-overview#important-notes) or in its [containment element](#containmentselector). If the application is using special CSS positioning, margins, or other offsets on the Window ancestors, these CSS styles may [affect the position of the Window](slug:troubleshooting-general-issues#wrong-popup-position). However, if `Top` and `Left` parameters are not defined or equal to `string.Empty`, the Telerik Window will be positioned at the center of the viewport by default.
20+
The Window renders [in the root of the application](slug:window-overview#important-notes) or in its [containment element](#containmentselector). However, if the `Top` and `Left` parameters are not defined or equal to `string.Empty`, the Telerik Window will be positioned at the center of the viewport by default.
21+
22+
If the application is using special CSS positioning, margins, or other offsets on the Window ancestors, these CSS styles may [affect the position of the Window](slug:troubleshooting-general-issues#wrong-popup-position).
2123

2224
## ContainmentSelector
2325

@@ -68,7 +70,7 @@ When the [Window `ContainmentSelector` parameter is set](#containmentselector),
6870

6971
## Center
7072

71-
The Telerik Window is automatically centered when the `Top` and `Left` parameters are not set or are explicitly set to `string.Empty`. This ensures the Window appears in the middle of the viewport by default. To see this behavior in action, refer to the [example](#example) below.
73+
The Telerik Window is automatically centered when the `Top` and `Left` parameters are not set or are explicitly set to `string.Empty`. To see this behavior in action, refer to the [example](#example) below.
7274

7375
## Example
7476

@@ -81,34 +83,33 @@ When the [Window `ContainmentSelector` parameter is set](#containmentselector),
8183
<code>WindowTop</code>: @WindowTop
8284
</p>
8385
84-
<TelerikWindow @bind-Left="@WindowLeft"
86+
<TelerikWindow @ref="@WindowRef"
87+
@bind-Left="@WindowLeft"
8588
@bind-Top="@WindowTop"
8689
Visible="true"
87-
Width="300px"
88-
@ref="@WindowRef">
90+
Width="300px">
8991
<WindowTitle>Window</WindowTitle>
9092
<WindowContent>
91-
The values of <code>WindowLeft</code> and <code>WindowTop</code> change after the user ends dragging, resizing or centering the window.
93+
The values of <code>WindowLeft</code> and <code>WindowTop</code> change after the user ends dragging or resizing.
9294
</WindowContent>
9395
<WindowFooter>
9496
<TelerikButton OnClick="@CenterWindow">Center Window</TelerikButton>
9597
</WindowFooter>
9698
</TelerikWindow>
9799
98100
@code {
99-
private TelerikWindow WindowRef { get; set; }
101+
private TelerikWindow? WindowRef { get; set; }
100102
private string WindowLeft { get; set; } = "50px";
101103
private string WindowTop { get; set; } = "50px";
102104
103105
private void CenterWindow()
104106
{
105107
WindowLeft = WindowTop = string.Empty;
106-
WindowRef.Refresh();
108+
WindowRef?.Refresh();
107109
}
108110
}
109111
````
110112

111-
112113
## See Also
113114

114115
* [Live Demo: Window Position](https://demos.telerik.com/blazor-ui/window/position)

0 commit comments

Comments
 (0)