The HttpNotificationChannel.ShellToastNotificationReceived
event is used to receive toast notifications within your app, like so:
channel.ShellToastNotificationReceived +=
channel_ShellToastNotificationReceived;
Note
Toast notifications are displayed only when your app is not running in the foreground. If your app is running in the foreground, the toast notification can still be received and handled in code.
When the ShellToastNotificationReceived
event is raised, the handler receives a NotificationEventArgs
object from which the relevant toast notification fields can be extracted, as shown:
void channel_ShellToastNotificationReceived(object sender,
NotificationEventArgs e)
{
string text1 = e.Collection["wp:Text1"];
string text2 = e.Collection["wp:Text2"];
//...
}
13.59.173.242