Click here to Skip to main content
15,914,394 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Toast notification have a "close button" in the upper right corner.I want to record the time-stamp and the title of thee toast when user click that "close button" in the UWP application.Is it possible to achieve?

What I have tried:

public class MyBackgroundTask : IBackgroundTask
{
public void Run(IBackgroundTaskInstance taskInstance)
{
var deferral = taskInstance.GetDeferral();
var details = taskInstance.TriggerDetails as ToastNotificationHistoryChangedTriggerDetail;
if (details != null)
{
if (details.ChangeType == ToastHistoryChangedType.Cleared || details.ChangeType == ToastHistoryChangedType.Removed)
{
// get current time
}
}
deferral.Complete();
}
}
Posted
Comments
Richard MacCutchan 30-Dec-16 4:09am    
What does the documentation say?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900