Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheduled notification example #5271

Open
true-perfect-code opened this issue Jan 17, 2025 · 0 comments
Open

Scheduled notification example #5271

true-perfect-code opened this issue Jan 17, 2025 · 0 comments
Labels

Comments

@true-perfect-code
Copy link

Type of issue

Typo

Feedback

Hi @stevewhims

In addition to the Show method (immediate display of notification), the UWP notification also offers a scheduled setting of the notification via Schedule method (here the code from UWP):

                    new ToastContentBuilder()
                        .AddArgument("conversationId", "9813")
                        .AddToastActivationInfo(null, ToastActivationType.Foreground)
                        .AddText(title, hintStyle: AdaptiveTextStyle.Header)
                        .AddText(body, hintStyle: AdaptiveTextStyle.Body)
                        .SetBackgroundActivation()
                        .Schedule((DateTimeOffset)dateTime.Value, t =>
                        {
                            t.ExpirationTime = dateTime.Value.AddDays(1);
                            t.Tag = identifier;
                            t.Group = Shared.Utility.Appl.AppName;
                            t.Id = identifier;
                        });

I am now missing this scheduled notification for Windows App SDK in your example.

Thanks
pc

Page URL

https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/migrate-to-windows-app-sdk/guides/toast-notifications?tabs=toolkit

Content source URL

https://github.com/MicrosoftDocs/windows-dev-docs/blob/docs/hub/apps/windows-app-sdk/migrate-to-windows-app-sdk/guides/toast-notifications.md

Author

@stevewhims

Document Id

0564856e-c274-3ed4-9060-f49dedf79f4d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant