Skip to main content
.NET 8.0+

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

MessageOptions.CancelDelegate Property

Specifies a delegate that is executed on a Cancel button click in WinForms applications or close button click in ASP.NET Core Blazor applications.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v24.2.dll

NuGet Package: DevExpress.ExpressApp

#Declaration

public Action CancelDelegate { get; set; }

#Property Value

Type Description
Action

A Action that is executed on a Cancel button click.

#Remarks

#WinForms UI

This parameter is supported in WinForms applications when the WinMessageOptions.Type property set to Flyout. The code snippet below demonstrates how to use this property.

using DevExpress.ExpressApp;
public class ProjectTaskController : ViewController {
    //…
    MessageOptions options = new MessageOptions();
    options.CancelDelegate = () => {
        //Place here your code that is executed on a Cancel button click.
    };
    //…
    Application.ShowViewStrategy.ShowMessage(options);
}

#ASP.NET Core Blazor UI

Use the CancelDelegate property to specify a delegate that is executed when a user clicks the notification’s close button.

See Also