blazor-devexpress-dot-blazor-dot-dxwindow-5f31568f.md
Specifies whether users can resize the Window.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[Parameter]
public bool AllowResize { get; set; }
| Type | Description |
|---|---|
| Boolean |
true to enable window resizing; otherwise, false.
|
Use the AllowResize property to allow users to change Users can drag the size grip to change the Window’s width and height.
You can handle the following events to process resize actions:
<DxButton RenderStyle="ButtonRenderStyle.Secondary"
Click="() => windowVisible = !windowVisible">SHOW A WINDOW</DxButton>
<DxWindow @bind-Visible=windowVisible
AllowResize=true
ResizeCompleted="OnWindowResizeCompleted"
HeaderText="Header"
BodyText="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sit amet metus vel
nisi blandit tincidunt vel efficitur purus. Nunc nec turpis tempus, accumsan orci auctor,
imperdiet mauris. Fusce id purus magna."
Width="@width"
Height="@height">
</DxWindow>
@code {
string width = "200px", height = "100px";
bool windowVisible;
void OnWindowResizeCompleted(WindowResizeCompletedEventArgs args) {
(width, height) = ($"{args.Size.Width}px", $"{args.Size.Height}px");
}
}
You can restrict window sizes with the following properties: MinWidth, MinHeight, MaxWidth, and MaxHeight.
See Also