WpfNotificationService Class

Class WpfNotificationService. Implements the IWpfNotificationService

Namespace:  Wpf.NotificationCenter.Services
Assembly:  Wpf.NotificationCenter (in Wpf.NotificationCenter.dll)

Syntax


public class WpfNotificationService : IWpfNotificationService
Public Class WpfNotificationService _
	Implements IWpfNotificationService
public ref class WpfNotificationService : IWpfNotificationService

Examples


Register this service:
C#
services.UseWpfNotificationCenter();
Inject service:
C#
public MyClass(IWpfNotificationService notificationService) {}
Usage:
C#
notificationService.Create(alertTitle, alertText, notificationType, alertType: alertType);
notificationService.Create(alertTitle, alertText, notificationType, "NotificationCenter", alertType);
notificationService.CreateAlertNotification(title, text, NotificationType.Information);
notificationService.Information(title, text, AlertType.NotificationPopup);
notificationService.Success(title, text, AlertType.NotificationPopup);
notificationService.Error(title, text, AlertType.NotificationPopup);
notificationService.Warning(title, text, AlertType.NotificationPopup);
Get the last toast or alert center notification:
C#
var toast = notificationService.GetLastToastNotification();
var alert = notificationService.GetLastAlertCenterNotification();

Inheritance Hierarchy


Object
  Wpf.NotificationCenter.Services..::..WpfNotificationService