.NET Standard 2.0+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET 5.0+

SimpleAction Class

Represents a Simple Action.

Namespace: DevExpress.ExpressApp.Actions

Assembly: DevExpress.ExpressApp.v21.2.dll

Declaration

[ToolboxTabName("DX.21.2: XAF Actions")]
public class SimpleAction :
    ActionBase

Remarks

The SimpleAction class inherits the basic functionality of Actions from the ActionBase class. Built-in Action Containers display Simple Actions via a button. Simple Actions are used to execute custom code when an end-user clicks this button. For this purpose, the SimpleAction.Execute event is designed.

To add a Simple Action to a Controller, drag and drop the SimpleAction item from the Toolbox (the XAF Actions section) onto the Controller’s Designer area (see Add a Simple Action). Alternatively, you can use the ActionAttribute to convert a business class’ method to an Action (see How to: Create an Action Using the Action Attribute).

Note

CodeRush allows you to add Actions and Controllers with a few keystrokes. To learn about the Code Templates for XAF, refer to the following help topic: XAF Templates.

You do not need to create SimpleAction objects because all Actions are created with their Controllers in each Window and Frame.

Set the IModelActionWeb.IsPostBackRequired property to true to send a postback when a user executes an Action in an ASP.NET Web Forms application. For example, for Actions that download files or change the application’s language.

The following code snippets (auto-collected from DevExpress Examples) contain references to the SimpleAction class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

Implements

See Also