MessageOptions.OkDelegate Property

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

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v18.2.dll

Declaration

public Action OkDelegate { get; set; }
Public Property OkDelegate As Action

Property Value

Type Description
Action

A Action that is executed a user clicks the message.

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);
}

See Also