Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxPopup.ResizeStarted Event

Fires when a user starts to resize the Popup.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public EventCallback<PopupResizeStartedEventArgs> ResizeStarted { get; set; }

#Event Data

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

Property Description
CancellationToken Specifies an object that propagates a cancellation notification.
Size Returns the Popup’s size before the resize operation.

#Remarks

When the AllowResize property is set to true, users can resize the Popup. Handle the ResizeStarted event to be notified when a user starts to resize the Popup. The event argument’s Size parameter returns the initial Popup size.

The following code snippet obtains the component’s initial size:

Razor
<div @onclick="@(() => PopupVisible = true)">
    <p>CLICK TO SHOW A POP-UP WINDOW</p>
</div>

<DxPopup @bind-Visible="@PopupVisible"
         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."
         AllowResize="true"
         ResizeStarted="ResizeStarted"
         Width="@Width"
         Height="@Height">
</DxPopup>

@code {
    bool PopupVisible { get; set; } = false;
    string? Width = "200px", Height = "100px";
    void ResizeStarted(PopupResizeStartedEventArgs args) {
        (Width, Height) = ($"{args.Size.Width}px", $"{args.Size.Height}px");
    }
}

Handle the ResizeCompleted event to be notified when a user finishes to resize the component.

See Also