Skip to content

Scheduled notification example #5271

Open
@true-perfect-code

Description

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

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions