コード例 #1
0
 private void NotificationListener_NotificationChanged(UserNotificationListener sender, UserNotificationChangedEventArgs args)
 {
     switch (args.ChangeKind)
     {
     case UserNotificationChangedKind.Added:
         UserNotification notification = sender.GetNotification(args.UserNotificationId);
         if (notification != null && notification.AppInfo.AppUserModelId == WINDOWS_SYSTEM_TOAST_CALLING)
         {
             sender.RemoveNotification(notification.Id);
         }
         break;
     }
 }