public static ToastNotification GetDownload(DownloadDesc des) { var toastContent = new ToastContent() { Visual = new ToastVisual() { BindingGeneric = new ToastBindingGeneric() { Children = { new AdaptiveText() { Text = $"{des.Title} - {des.Description} has downloaded" } }, Attribution = new ToastGenericAttributionText() { Text = "Aurora Music" } } } }; // Create the toast notification return(new ToastNotification(toastContent.GetXml()) { Tag = des.Guid.ToString() }); }
public static void SendDownload(DownloadDesc des) { var toast = GetDownload(des); // Remove old (if have) ToastNotificationManager.History.Remove(toast.Tag); // And send the notification ToastNotificationManager.CreateToastNotifier().Show(toast); }