/// <summary>Displays the toast.</summary> /// <param name="type">The type.</param> /// <param name="message">The message.</param> /// <param name="date">The date.</param> private static void DisplayToast(string type, string message, DateTime date) { //Creates a new notification manager Notifications.Wpf.NotificationManager notificationManager = new Notifications.Wpf.NotificationManager(); //Shows the notification with the given data notificationManager.Show(new NotificationContent { Title = type, Message = message + " " + date.ToString("d"), Type = NotificationType.Information }); }
public void ShowNotification(TimeSpan timeToAutoClose) { _notification.Close(); _manager.Show(_notification, expirationTime: timeToAutoClose); }