1

我的 toast 消息具有以下格式:

string toastMessage = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
"<wp:Notification xmlns:wp=\"WPNotification\">" +
"<wp:Toast>" +
    "<wp:Text1>[string]</wp:Text1>" +
    "<wp:Text2>[string]</wp:Text2>" +
    "<wp:Param>[string]</wp:Param>" +
    "<wp:myCustomParam1>[string]</wp:myCustomParam1>" +
    "<wp:myCustomParam2>[string]</wp:myCustomParam2>" +
    "<wp:myCustomParam3>[string]</wp:myCustomParam3>" +
"</wp:Toast>" +
"</wp:Notification>";

当我的应用程序正在运行时,我可以在ShellToastNotificationReceived(object sender, NotificationEventArgs e)事件处理程序上接收我的自定义参数(wp:myCustomParam1 和其他)作为键e.Collection

但是当我的应用程序没有运行并且通知到来时,用户点击弹出通知并且应用程序启动,ShellToastNotificationReceived 没有调用并且通知丢失。

那么,在这种情况下如何获取我的自定义参数呢?

4

0 回答 0