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

XafApplication.CustomProcessShortcut Event

Occurs when a View is created by its shortcut.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v21.2.dll

Declaration

public event EventHandler<CustomProcessShortcutEventArgs> CustomProcessShortcut

Event Data

The CustomProcessShortcut event's data class is CustomProcessShortcutEventArgs. The following properties provide information specific to this event:

Property Description
Handled Gets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing. Inherited from HandledEventArgs.
View Specifies the View to be created for the CustomProcessShortcutEventArgs.Shortcut

Remarks

This event is raised as a result of calling the XafApplication.ProcessShortcut method. You can handle this event to create a custom View when a specific shortcut is passed as the handler’s CustomProcessShortcutEventArgs.Shortcut parameter. Set the created View to the CustomizePopupWindowParamsEventArgs.View parameter. To cancel the default View creation, set the Handled parameter to true.

public sealed partial class MySolutionModule : ModuleBase {
   // ...
    public override void Setup(XafApplication application) {
        base.Setup(application);
        application.CustomProcessShortcut += delegate (object sender, CustomProcessShortcutEventArgs e) {
            if ((e.Shortcut.ViewId == "MyDomainObject_ListView")) {
                IObjectSpace objectSpace = Application.CreateObjectSpace(e.Shortcut.ObjectClass);
                e.View = Application.CreateDashboardView(objectSpace, "MyDashboardView", true);
                e.Handled = true;
            }
        };
    }
    // ...
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CustomProcessShortcut event.

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.

See Also