Skip to main content
All docs
V25.1
  • DxWindow.AllowResize Property

    Specifies whether users can resize the Window.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [Parameter]
    public bool AllowResize { get; set; }

    Property Value

    Type Description
    Boolean

    true to enable window resizing; otherwise, false.

    Remarks

    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");
        }
    }
    

    Run Demo: Window - Resizing

    You can restrict window sizes with the following properties: MinWidth, MinHeight, MaxWidth, and MaxHeight.

    See Also