Skip to main content

WindowClosedEventArgs Class

Contains data for the Closed event.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor


public class WindowClosedEventArgs :


The Closed event fires after the Window is closed in one of the following ways:

  • A user closes the Window: clicks the Close button, clicks outside the Window boundaries, or presses Escape.
  • You set the Visible property to false.
  • You call the CloseAsync method.
  • The CloseCallback is called from any template.

Handle the Closed event to process close actions. You can also handle the Closing event that fires before the Window is closed and allows you to cancel this action.

In the following example, neither the Close button in the header nor the custom OK button closes the Window until a user enables the checkbox in the footer:

<DxButton Id="showDDbtton" Click="() => IsOpen = true">SHOW A WINDOW</DxButton>
<DxWindow Width="400"
            HeaderText="DevExpress EULA"
            The terms of our license are fully outlined/described in the Developer Express Inc End User
            License Agreement (EULA) included with our product installations. Before you can install and use
            a Developer Express Inc product, you must read, understand and accept the terms/conditions of
            our EULAs. <a target="" _blank"" rel="" noopener noreferrer"" href="" https: //"">More info...</a>
        <DxCheckBox style="margin-left: 0; margin-right: auto;" @bind-Checked="@EulaAccepted">
            I accept the terms of the EULA
        <DxButton RenderStyle="ButtonRenderStyle.Primary" Text="OK" Click="context.CloseCallback" />

@code {
    bool IsOpen { get; set; } = false;
    bool EulaAccepted { get; set; }

    void EulaClosing(WindowClosingEventArgs args) {
        if (args.CloseReason == WindowCloseReason.Programmatically) {
            args.Cancel = !EulaAccepted;
    void EulaClosed(WindowClosedEventArgs args) {
        EulaAccepted = false;


See Also