Skip to content

Commit 7d40b42

Browse files
committed
docs(Window): remove center parameter
1 parent 3067841 commit 7d40b42

File tree

2 files changed

+3
-34
lines changed

2 files changed

+3
-34
lines changed

components/window/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ You can make the Window component responsive and allow it to adapt to different
5656

5757
## Position
5858

59-
You can set the position of the Window with the `Top` and `Left` parameters. The component features a boolean `Centered` parameter, which is `true` by default when `Top` and `Left` are not set. The Window component also provides a `ContainmentSelector` parameter that can limit resizing and dragging within the boundaries of a specified container.
59+
You can set the position of the Window with the `Top` and `Left` parameters. The Window component also provides a `ContainmentSelector` parameter that can limit resizing and dragging within the boundaries of a specified container.
6060

6161
Read more about the [Blazor Window position...](slug:components/window/position)
6262

@@ -84,7 +84,6 @@ The following table lists the Window parameters. Also check the [Window API](slu
8484

8585
| Parameter | Type and Default Value | Description |
8686
| --- | --- | --- |
87-
| `Centered` | `bool` <br /> (`true`) | Determines if the Window displays in the middle of the viewport. This parameter is ignored if `Top` or `Left` is set to a non-empty string. |
8887
| `Class` | `string` | The custom CSS class of the `<div class="k-window">` element. Use it to [override theme styles](slug:themes-override). Here is a [custom Window styling example](slug:window-kb-custom-css-styling). |
8988
| `CloseOnOverlayClick` | `bool` | Sets if a modal Window will close when the user clicks on the modal overlay that covers the rest of the page content. |
9089
| `ContainmentSelector` | `string` | A CSS selector that points to a unique HTML element on the page. The Window will render inside the specified container. Window resizing and dragging will be restricted by the boundaries of the specified container. Do not use `ContainmentSelector` with modal Windows. |
@@ -172,6 +171,7 @@ In Blazor, however, the render tree structure may be important. In some cases, t
172171
* [Configure the Window position](slug:components/window/position)
173172
* [Set the Window size, minimized, and maximized state](slug:components/window/size)
174173
* [Handle Window events](slug:window-events)
174+
* [Learn How to Programmatically Center the Window](slug:window-kb-center-programmatically)
175175

176176
## See Also
177177

components/window/position.md

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -12,43 +12,11 @@ position: 2
1212

1313
The Window offers several ways to control its position:
1414

15-
* [`Centered` parameter](#centered)
1615
* [`ContainmentSelector` parameter](#containmentselector)
1716
* [`Top` and `Left` parameters](#top-and-left)
1817

1918
The Window renders [in the root of the application](slug:window-overview#important-notes) or in its [containment element](#containmentselector). If the app 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).
2019

21-
22-
## Centered
23-
24-
The `Centered` parameter determines if the Window displays centered in the viewport. The parameter value is `true` by default.
25-
26-
A centered Window applies the following CSS styles, which maintain the centered position even if the viewport size changes:
27-
28-
````CSS.skip-repl
29-
.k-centered {
30-
top: 50%;
31-
left: 50%;
32-
transform: translate(-50%, -50%);
33-
}
34-
````
35-
36-
If the `Top` or `Left` parameters are set and not empty, they take precedence over `Centered`. To center the Window dynamically through its `Centered` parameter, bind the `Top` and `Left` parameters too, so you can reset them to `string.Empty` or `null`.
37-
38-
>caption Center the Window
39-
40-
````RAZOR
41-
<TelerikWindow Centered="true" Visible="true">
42-
<WindowTitle>
43-
Window Title
44-
</WindowTitle>
45-
<WindowContent>
46-
A Centered Window
47-
</WindowContent>
48-
</TelerikWindow>
49-
````
50-
51-
5220
## ContainmentSelector
5321

5422
By default, users can drag and resize the Window without constraints. You can restrict the Window's visual position to the boundaries of a specific container:
@@ -127,3 +95,4 @@ When the [Window `ContainmentSelector` parameter is set](#containmentselector),
12795

12896
* [Live Demo: Window Position](https://demos.telerik.com/blazor-ui/window/position)
12997
* [Live Demo: Constrain Window Movement](https://demos.telerik.com/blazor-ui/window/constrain-movement)
98+
* [How to Center the Window Programmatically](slug:window-kb-center-programmatically)

0 commit comments

Comments
 (0)