New to Telerik UI for Blazor? Download Free 30-day trial
Window - Constrain Movement
- EXAMPLE
- VIEW SOURCE
- EDIT IN TELERIK REPL
- Change Theme
default
div#window-box-1
Drag, resize or maximize this Window within the boundaries of its container div#window-box-1 with a
position:relative
style.
div#window-box-2
Drag, resize or maximize this Window within the boundaries of its container div#window-box-2 with a
position:relative
style.
- Constrain-movement.razor
Loading the demo source code...please wait.
Description
You can restrict the Window resizing and dragging to the boundaries of a specific container. To achieve that, place the Window inside a container with a position:relative
style and set the Window ContainmentSelector
parameter to a CSS selector that points to the container.
In this case, the Window will render inside the specified container and not as a child of the TelerikRootComponent
.
This Blazor Window Constrain Movement example is part of a unique collection of hundreds of Blazor demos, with which you can see all Telerik UI for Blazor components and their features in action. View the source code of the demos from the library or directly adapt, and edit them and their theme appearance in Telerik REPL for Blazor or ThemeBuilder.