void SendToast(FlickrPhotoResult flickrPhotoResult) { ToastNotifier toastNotifier = ToastNotificationManager.CreateToastNotifier(); XmlDocument xmlToastContent = ToastNotificationManager.GetTemplateContent( ToastTemplateType.ToastImageAndText01); TemplateUtility.CompleteTemplate( xmlToastContent, new string[] { flickrPhotoResult.Title }, new string[] { flickrPhotoResult.ImageUrl }, "ms-winsoundevent:Notification.Mail"); // TODO: change delivery time ScheduledToastNotification toastNotification = new ScheduledToastNotification(xmlToastContent, (new DateTimeOffset(DateTime.Now) + TimeSpan.FromSeconds(10))); // TODO: change identifier toastNotification.Id = "Fred"; toastNotifier.AddToSchedule(toastNotification); }
void SendToast(FlickrPhotoResult flickrPhotoResult) { ToastNotifier toastNotifier = ToastNotificationManager.CreateToastNotifier(); XmlDocument xmlToastContent = ToastNotificationManager.GetTemplateContent( ToastTemplateType.ToastImageAndText01); TemplateUtility.CompleteTemplate( xmlToastContent, new string[] { flickrPhotoResult.Title }, new string[] { flickrPhotoResult.ImageUrl }, "ms-winsoundevent:Notification.Mail"); // TODO: change delivery time ScheduledToastNotification toastNotification = new ScheduledToastNotification(xmlToastContent, (new DateTimeOffset(DateTime.Now) + TimeSpan.FromSeconds(10))); // TODO: change identifier toastNotification.Id = "Fred"; toastNotifier.AddToSchedule(toastNotification); }