Back to Devexpress

Controller.Actions Property

expressappframework-devexpress-dot-expressapp-dot-controller-dd15e8b0.md

latest2.3 KB
Original Source

Controller.Actions Property

Returns a Controller‘s Action collection.

Namespace : DevExpress.ExpressApp

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
[Browsable(false)]
public ActionList Actions { get; }
vb
<Browsable(False)>
Public ReadOnly Property Actions As ActionList

Property Value

TypeDescription
DevExpress.ExpressApp.Core.ActionList

A list of the current Controller’s Actions.

|

Remarks

To manage the current Controller’s Actions list, use members of the ActionList object that this property returns. For example, use the Add , AddRange , and Clear methods or the Count property.

The following example demonstrates how to get the Task.MarkCompleted Action from this collection:

csharp
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.SystemModule;
using DevExpress.ExpressApp.Actions;
// ...
public class MyViewController : ViewController {
    protected override void OnActivated() {
        base.OnActivated();
        ObjectMethodActionsViewController controller = Frame.GetController<ObjectMethodActionsViewController>();
        if (controller != null) {
            SimpleAction markCompletedAction = controller.Actions["Task.MarkCompleted"] as SimpleAction;
            // ...
        }
        // ...
    }
}

Refer to the following help topic for information on how to get an identifier of an Action: Determine an Action’s Controller and Identifier.

See Also

Controller Class

Controller Members

DevExpress.ExpressApp Namespace