Window Size
The Window offers different features to control its size:
- Width and Height, together with min/max parameters
- Maximize and Minimize
- User resizing
Width and Height
If you know the size you need, just set the Width or Height parameters. They can take valid CSS values (see the Dimensions article).
The Window also provides parameters that control its dimensions in a more flexible way:
MinHeightMaxHeightMinWidthMaxWidth
Min/max dimensions take precedence over user resizing and Width / Height settings.
If no dimensions are set, the Window will expand, according to its contents, like any other <div> element. This may affect the Window's positioning.
If you set dimensions and the Window content does not fit, scrollbars will show.
Configure Window Width and Height, and min/max dimensions
Maximize and Minimize
The user can maximize and minimize the Window through action buttons in its titlebar.
You can invoke those actions by setting the State parameter. It takes a member of the Telerik.Blazor.WindowState enum:
WindowState Value | Description |
|---|---|
Default | The size and position will depend on the Top, Left, Centered, Width, Height, Size parameters. |
Minimized | The Window will show its titlebar only. The component will dispose its content and remove it from the page DOM. If you prefer to just hide the Window content with CSS, set PersistContent to true. |
Maximized | The Window will take up the entire viewport. |
Maximize, Minimize and Restore the Window programmatically
With a maximized window you may want to ensure all other content stays "behind" it. To do that, see the Block all content with a Window article on ensuring that the CSS rules in the project can enable that.
Resizing
By default, the Window is resizable. Window resizing can be controlled with min/max Window dimensions.
To disable resizing, set the Resizable parameter to false.
Window Resizing