Last active
January 31, 2018 22:28
-
-
Save gdoddsy/69adcf512b29d77e82cc77595a7bebce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void GenerateToast(string title, string message) | |
{ | |
var template = ToastTemplateType.ToastImageAndText02; | |
var toastXML = ToastNotificationManager.GetTemplateContent(template); | |
var images = toastXML.GetElementsByTagName("image"); | |
images[0].Attributes[1].NodeValue = @"file://**FilePath**\**FileName.png"; | |
var textNodes = toastXML.GetElementsByTagName("text"); | |
textNodes[0].AppendChild(toastXML.CreateTextNode(title)); | |
textNodes[1].AppendChild(toastXML.CreateTextNode(message)); | |
ToastNotificationManager.CreateToastNotifier("**AppName**").Show(new Windows.UI.Notifications.ToastNotification(toastXML)); | |
} | |
<targetplatformversion>10.0</targetplatformversion> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment