Skip to main content
All docs
V24.2
.NET 8.0+

How to Add the Notifications Module (.NET)

  • 2 minutes to read

This article describes how to add the Notifications module to .NET ASP.NET Core Blazor and Windows Forms applications.

The module allows you to display reminders for scheduler appointments or any custom business object.

Step-by-Step Instructions

  1. Add the DevExpress.ExpressApp.Notifications NuGet package to the MySolution.Module project. See the following topic for more information on how to install DevExpress NuGet packages: Choose Between Offline and Online DevExpress NuGet Feeds.

  2. In the Solution Explorer, go to the MySolution.Module project and open the Module.cs file. Add the Notifications module to the RequiredModuleTypes collection.

    //...
    namespace MySolution.Module;
    //...
    public sealed class MySolutionModule : ModuleBase {
        public MySolutionModule() {
            //...
            RequiredModuleTypes.Add(typeof(DevExpress.ExpressApp.Notifications.NotificationsModule));
        }
    //...
    }
    
  3. Add the following NuGet packages to platform-specific projects in your application:

    • MySolution.Blazor.Server project: DevExpress.ExpressApp.Notifications.Blazor
    • MySolution.Win project: DevExpress.ExpressApp.Notifications.Win
  4. In ASP.NET Core Blazor application, navigate to the MySolution.Blazor.Server\Startup.cs file and call the AddNotifications(IModuleBuilder<IBlazorApplicationBuilder>, Action<NotificationsOptions>) method.

    In Windows Forms application, navigate to the MySolution.Win\Startup.cs file and call the AddNotifications(IModuleBuilder<IWinApplicationBuilder>, Action<NotificationsOptions>) method.

    public class Startup {
    // ...
        public void ConfigureServices(IServiceCollection services) {
            // ...
            services.AddXaf(Configuration, builder => {
                builder.UseApplication<MySolutionBlazorApplication>();
                builder.Modules
                    // ...
                    .AddNotifications();
                // ...
            });
            // ...
        }
    }
    

Tip

For more information about this module, refer to the following topic: How to: Use Notifications with the Scheduler Event.