I have a desktop application running in Windows 10 which creates ToastNotifications that are also being stored in the Action Center. I noticed, that when I reboot the computer the Notifications are still present in the Action Center so I wanted to remove them through my Application when they're not necessary anymore.
I wanted to use the ToastNotificationHistory
public static void RemoveNotificationByTag(string toastTag)
System.Exception: 'Element not found. (Exception from HRESULT: 0x80070490)'
On Windows 10 it is necessary to provide the applicationId parameter to each of the methods.
Calling the method like this works:
ToastNotificationManager.History.Remove(toastTag, "KB", appId);