Skip to main content
All docs
V25.1
  • DxWindow.ResizeCompleted Event

    Fires after the Window is resized.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [Parameter]
    public EventCallback<WindowResizeCompletedEventArgs> ResizeCompleted { get; set; }

    Event Data

    The ResizeCompleted event's data class is WindowResizeCompletedEventArgs. The following properties provide information specific to this event:

    Property Description
    CancellationToken Specifies an object that propagates a cancellation notification.
    Size Returns the current window size.

    Remarks

    When the AllowResize property is set to true, users can resize the Window. Handle the ResizeCompleted event to be notified when a user resizes the window. The event argument’s Size parameter returns the new window size.

    <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

    See Also