NotificationsController.CustomProcessNotifications Event

Occurs before the notification window is shown.

Namespace: DevExpress.ExpressApp.Notifications

Assembly: DevExpress.ExpressApp.Notifications.v18.2.dll

Declaration

public event EventHandler<NotificationItemsEventArgs> CustomProcessNotifications
Public Event CustomProcessNotifications As EventHandler(Of NotificationItemsEventArgs)

The event handler receives an argument of the NotificationItemsEventArgs type.

Property Description
NotificationItems

Gets the list of INotificationItem objects to be processed.

Handle the CustomProcessNotifications event to apply custom processing to the notification list received from the Notifications Service. If you do not need to use the default logic in this event, set the Handled property to true and call the NotificationsController.RefreshNotifications method to display the notification list after your custom logic is performed as shown below.

using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Notifications;
using DevExpress.Persistent.Base.General;
//...
public class MyController : WindowController {
    protected override void OnActivated() {
        //...
        controller.CustomProcessNotifications += Controller_CustomProcessNotifications;
    }
    private void Controller_CustomProcessNotifications(object sender, DevExpress.Persistent.Base.General.NotificationItemsEventArgs e) {
        foreach(INotificationItem item in e.NotificationItems) {
            //...
        }
        e.Handled = true;
        ((NotificationsController)sender).RefreshNotifications();
    }
}

See Also