Я нацелен на Windows 10
Build 10586
.ScheduledToastNotification Не показывать, если DeliveryTime Missed
Использование Microsoft.Toolkit.Uwp.Notifications
библиотеки для создания этого Toast:
ToastContent content = new ToastContent()
{
Launch = "@remider",
Visual = new ToastVisual()
{
BindingGeneric = new ToastBindingGeneric()
{
Children =
{
new AdaptiveText()
{
Text = "This is Toast"
},
new AdaptiveText()
{
Text = "This is toast content"
}
},
AppLogoOverride = new ToastGenericAppLogo()
{
Source = "ms-appx:///Assets/Toast/Toast.png",
}
},
},
Scenario = ToastScenario.Reminder,
Actions = new ToastActionsCustom()
{
Buttons =
{
new ToastButton("Open App", "@remider:1"),
new ToastButton("Dismiss", "cancel"){ActivationType = ToastActivationType.Background}
}
}
};
var remiderTime = DateTimeOffset.Now.AddMinutes(15);
ToastNotifier toastNotifier = ToastNotificationManager.CreateToastNotifier();
toastNotifier.AddToSchedule(new ScheduledToastNotification(content.GetXml(), remiderTime));
сказать, что reminderTime является 10:00 AM
, и мне выключить компьютер в 09:58 AM
и включите мой компьютер снова 10:15 AM
, не Тост не показали, потому что он пропустил Delivery Time
(10:00 AM
), потому что я выключил свой компьютер в то время.
Я хочу, чтобы Тост показывал, что даже время доставки пропущено. Как это достичь?