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.OkDelegate Property

Specifies a delegate that is executed when a user clicks a notification message (or if the WinMessageOptions.Type property is set to Flyout in a WinForms application and the OK button is clicked).

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v24.2.dll

NuGet Package: DevExpress.ExpressApp

#Declaration

public Action OkDelegate { get; set; }

#Property Value

Type Description
Action

A Action that is executed a user clicks the message.

#Remarks

#Winforms UI

The code snippet below demonstrates how to use this property.

using DevExpress.ExpressApp;
public class ProjectTaskController : ViewController {
    //…
    MessageOptions options = new MessageOptions();
    options.OkDelegate = () => {
        IObjectSpace os = Application.CreateObjectSpace(typeof(ProjectTask));
        DetailView newTaskDetailView = Application.CreateDetailView(os, os.CreateObject<ProjectTask>());
        Application.ShowViewStrategy.ShowViewInPopupWindow(newTaskDetailView);
     };
     //…
     Application.ShowViewStrategy.ShowMessage(options);
}

#ASP.NET Core Blazor UI

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

See Also