1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | private void ShowToast() { string title = "featured picture of the day"; string content = "beautiful scenery"; string image = "https://picsum.photos/360/180?image=104"; string logo = "https://picsum.photos/64?image=883"; string xmlString = $@"<toast><visual> <binding template='ToastGeneric'> <text>{title}</text> <text>{content}</text> <image src='{image}'/> <image src='{logo}' placement='appLogoOverride' hint-crop='circle'/> </binding> </visual></toast>"; XmlDocument toastXml = new XmlDocument(); toastXml.LoadXml(xmlString); ToastNotification toast = new ToastNotification(toastXml); ToastNotificationManager.CreateToastNotifier().Show(toast); } |