The requested page is not available for the requested platform. You are viewing the content for Default platform.

WorkflowWindowsFormsModule.QueryAvailableActivities Event

Occurs prior to loading the rehosted workflow designer.

Namespace: DevExpress.ExpressApp.Workflow.Win

Assembly: DevExpress.ExpressApp.Workflow.Win.v19.1.dll


public event EventHandler<ActivitiesInformationEventArgs> QueryAvailableActivities
Public Event QueryAvailableActivities As EventHandler(Of ActivitiesInformationEventArgs)

Event Data

The QueryAvailableActivities event handler receives an argument of the ActivitiesInformationEventArgs type. The following properties provide information specific to this event.

Property Description
ActivitiesInformation Specifies activities that will be available in the rehosted workflow designer's toolbox.


Handle this event to customize the list of activities that will be available in the rehosted workflow designer's toolbox. The following code snippet demonstrates how to remove a MyActivity activity from the toolbox.

using System;
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Workflow;
using DevExpress.ExpressApp.Workflow.Win;
public class MyWindowController : WindowController {
    WorkflowWindowsFormsModule workflowModuleWin;
    protected override void OnActivated() {
        workflowModuleWin = Application.Modules.FindModule<WorkflowWindowsFormsModule>();
        if (workflowModuleWin != null)
            workflowModuleWin.QueryAvailableActivities += OnQueryAvailableActivities;
    void OnQueryAvailableActivities(object sender, ActivitiesInformationEventArgs e) {
        ActivityInformation myActivity = 
            e.ActivitiesInformation.Find(i => i.DisplayName == "MyActivity");
    protected override void OnDeactivated() {
        if (workflowModuleWin != null) {
            workflowModuleWin.QueryAvailableActivities -= OnQueryAvailableActivities;
            workflowModuleWin = null;

To see an example of handling this event to add new activities to the toolbox, refer to the Add Activities to the Workflow Designer Toolbox help topic.

See Also