private void ANCS_NotificationRemoved(NotificationConsumer sender, NotificationSourceData args) { var toastHistory = ToastNotificationManager.History; try { toastHistory.Remove(args.NotificationUID.ToString()); } catch (Exception) { // Just be silent } }
private void NotificationConsumer_NotificationRemoved(NotificationConsumer sender, NotificationSourceData args) { try { ToastNotificationManager.History.Remove(args.NotificationUID.ToString(), args.CategoryId.ToString(), "Apple Notification Center"); } catch (Exception e) { MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }