private static async Task ShowToastNotifcation(String Message, ToastDuration Length) { var toastContent = new ToastContent() { Visual = new ToastVisual() { BindingGeneric = new ToastBindingGeneric() { Children = { new AdaptiveText() { Text = Message } } } }, Audio = new ToastAudio() { Silent = true } }; // Create the toast notification var toastNotif = new ToastNotification(toastContent.GetXml()) { ExpirationTime = DateTimeOffset.Now.AddMilliseconds((double)Length), Tag = toastContent.GetHashCode().ToString() }; // And send the notification ToastNotificationManager.CreateToastNotifier().Show(toastNotif); // Remove notification after delay await Task.Delay((int)Length); ToastNotificationManager.History.Remove(toastNotif.Tag); }