Dear All,
i use the Microsoft.Toolkit.Uwp.Notifications package to handle Toast Notifications. Works well so far.
Now i want to have more control over the notifications - hiding / updating them.
Therefore i need e.g. the Class ToastNotificationHistoryCompat.
I want to use ToastNotificationHistoryCompat.Clear() for clearing all notifications of my app or ToastNotificationHistoryCompat.Remove("<tag>") for removing a special notification.
But i didn't have success so far.
I'm relatively new to C#, so probably i didn't understand some basics about class handling, so i beg your insulgance ;-)
Thank you + Best regards
Emanuel
What I have tried:
First i thought i have to handle it as an abstract class (without instance), so i tried
public static ToastNotificationHistoryCompat tnh;
...
tnh.Clear();
But the error message told me that "he" expected an instance.
("Object reference not set to an instance of an object.")
So i tried
ToastNotificationHistoryCompat tnh;
tnh.Clear();
Didn't work.
I tried to find a constructor (".new()"), but i have currently no idea how to handle the class ToastNotificationHistoryCompat and its methods.