Skip to content

Commit 77438c7

Browse files
drewbatgitCopilot
andcommitted
Review toast-ux-guidance, retire toast-desktop-apps, rewrite scheduled-toast, rename files
- toast-ux-guidance: rewrite intro, remove toast terminology NOTE, fix curly apostrophe, update Related articles - toast-desktop-apps: retire (legacy COM activation), redirect to quickstart - toast-schema -> notification-schema: rename, update title, Action Center -> Notification Center - scheduled-toast -> scheduled-notification: rename, full rewrite with validated WASDK + ScheduledToastNotification code, remove legacy sections - Update all cross-references and redirects Co-authored-by: Copilot <[email protected]>
1 parent 0444d72 commit 77438c7

13 files changed

Lines changed: 119 additions & 271 deletions

.openpublishing.redirection.json

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9526,8 +9526,21 @@
95269526
"redirect_document_id": true
95279527
},
95289528
{
9529-
"source_path": "hub/apps/design/shell/tiles-and-notifications/channel-types.md",
9530-
"redirect_url": "../../../develop/notifications/channel-types",
9529+
"source_path": "hub/apps/develop/notifications/app-notifications/toast-desktop-apps.md",
9530+
"redirect_url": "app-notifications-quickstart",
9531+
"redirect_document_id": true
9532+
},
9533+
{
9534+
"source_path": "hub/apps/develop/notifications/app-notifications/toast-schema.md",
9535+
"redirect_url": "notification-schema",
9536+
"redirect_document_id": true
9537+
},
9538+
{
9539+
"source_path": "hub/apps/develop/notifications/app-notifications/scheduled-toast.md",
9540+
"redirect_url": "scheduled-notification",
9541+
"redirect_document_id": true
9542+
},
9543+
{
95319544
"redirect_document_id": false
95329545
},
95339546
{
@@ -9562,7 +9575,7 @@
95629575
},
95639576
{
95649577
"source_path": "hub/apps/design/shell/tiles-and-notifications/scheduled-toast.md",
9565-
"redirect_url": "../../../develop/notifications/app-notifications/scheduled-toast",
9578+
"redirect_url": "../../../develop/notifications/app-notifications/scheduled-notification",
95669579
"redirect_document_id": false
95679580
},
95689581
{
@@ -9617,7 +9630,7 @@
96179630
},
96189631
{
96199632
"source_path": "hub/apps/design/shell/tiles-and-notifications/toast-schema.md",
9620-
"redirect_url": "../../../develop/notifications/app-notifications/toast-schema",
9633+
"redirect_url": "../../../develop/notifications/app-notifications/notification-schema",
96219634
"redirect_document_id": false
96229635
},
96239636
{

hub/apps/desktop/modernize/get-activation-info-for-packaged-apps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ You can use the [AppInstance.GetActivatedEventArgs](/uwp/api/windows.application
6161
|-------------------|-----------------|-----------------------|
6262
| [ShareTargetActivatedEventArgs](/uwp/api/windows.applicationmodel.activation.sharetargetactivatedeventargs) | [uap:ShareTarget](/uwp/schemas/appxpackage/uapmanifestschema/element-uap-sharetarget) | [Making your desktop application a share target](./desktop-to-uwp-extend.md#making-your-desktop-application-a-share-target) |
6363
| [ProtocolActivatedEventArgs](/uwp/api/windows.applicationmodel.activation.protocolactivatedeventargs) | [uap:Protocol](/uwp/schemas/appxpackage/uapmanifestschema/element-uap-protocol) | [Start your application by using a protocol](./desktop-to-uwp-extensions.md#start-your-application-by-using-a-protocol) |
64-
| [ToastNotificationActivatedEventArgs](/uwp/api/windows.applicationmodel.activation.toastnotificationactivatedeventargs) | desktop:ToastNotificationActivation | [Toast notifications from desktop apps](/windows/uwp/design/shell/tiles-and-notifications/toast-desktop-apps). |
64+
| [ToastNotificationActivatedEventArgs](/uwp/api/windows.applicationmodel.activation.toastnotificationactivatedeventargs) | desktop:ToastNotificationActivation | [App notifications quickstart](/windows/apps/develop/notifications/app-notifications/app-notifications-quickstart). |
6565
| [StartupTaskActivatedEventArgs](/uwp/api/windows.applicationmodel.activation.startuptaskactivatedeventargs) | desktop:StartupTask | [Start an executable file when users log into Windows](./desktop-to-uwp-extensions.md#start-an-executable-file-when-users-log-into-windows) |
6666
| [FileActivatedEventArgs](/uwp/api/windows.applicationmodel.activation.fileactivatedeventargs) | [uap:FileTypeAssociation](/uwp/schemas/appxpackage/uapmanifestschema/element-uap-filetypeassociation) | [Associate your packaged application with a set of file types](./desktop-to-uwp-extensions.md#associate-your-packaged-application-with-a-set-of-file-types) |
6767
| [VoiceCommandActivatedEventArgs](/uwp/api/windows.applicationmodel.activation.voicecommandactivatedeventargs) | None | [Activate a foreground app with voice commands through Cortana](../../design/input/cortana-launch-a-foreground-app-with-voice-commands.md) |

hub/apps/desktop/modernize/modernize-wpf-tutorial-4.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ To add a notification to the app:
387387
}
388388
```
389389

390-
Toast notifications are represented by an XML payload, which can include text, images, actions, and more. You can find all the supported elements [here](/windows/uwp/design/shell/tiles-and-notifications/toast-schema). This code uses a very simple schema with two lines of text: the title and the body. After the code defines the XML payload and loads it in an **XmlDocument** object, it wraps the XML in a **ToastNotification** object and shows it by using the **ToastNotificationManager** class.
390+
Toast notifications are represented by an XML payload, which can include text, images, actions, and more. You can find all the supported elements [here](/windows/apps/develop/notifications/app-notifications/notification-schema). This code uses a very simple schema with two lines of text: the title and the body. After the code defines the XML payload and loads it in an **XmlDocument** object, it wraps the XML in a **ToastNotification** object and shows it by using the **ToastNotificationManager** class.
391391

392392
5. In the **ContosoExpenses.Core** project, expand the **ViewModels** folder and open the **AddNewExpenseViewModel.cs** file.
393393

hub/apps/develop/notifications/app-notifications/app-notifications-content.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ The attribution area is at the top of the app notification. Starting with Window
7878

7979
Each app notification must specify a **visual** element, where you must provide a generic toast binding and which can contain text and images. These elements will be rendered on various Windows devices, including desktop, phones, tablets, and Xbox.
8080

81-
For all attributes supported in the **visual** section and its child elements, see [App notification schema](toast-schema.md#toastvisual).
81+
For all attributes supported in the **visual** section and its child elements, see [App notification schema](notification-schema.md#toastvisual).
8282

8383
## Text elements
8484

85-
Each app notification must have at least one text element, and can contain two additional text elements, all of type [**AdaptiveText**](toast-schema.md#adaptivetext).
85+
Each app notification must have at least one text element, and can contain two additional text elements, all of type [**AdaptiveText**](notification-schema.md#adaptivetext).
8686

8787
![A screenshot of an app notification with three lines of text. The top line of text is bold.](images/toast-content-text-elements.png)
8888

@@ -195,7 +195,7 @@ var builder = new AppNotificationBuilder()
195195

196196
## Hero image
197197

198-
App notifications can display a hero image, which is a featured [**ToastGenericHeroImage**](toast-schema.md#toastgenericheroimage) displayed prominently within the toast banner and while inside Notification Center. Image dimensions are 364x180 pixels at 100% scaling.
198+
App notifications can display a hero image, which is a featured [**ToastGenericHeroImage**](notification-schema.md#toastgenericheroimage) displayed prominently within the toast banner and while inside Notification Center. Image dimensions are 364x180 pixels at 100% scaling.
199199

200200
![A screenshot of an app notification showing the hero image placement, above the attribution area.](images/toast-content-hero-image.png)
201201

@@ -318,7 +318,7 @@ In addition to the content specified above, you can also display additional adap
318318

319319
This additional content is specified using Adaptive, which you can learn more about by reading the [Adaptive Tiles documentation](/windows/uwp/launch-resume/create-adaptive-tiles).
320320

321-
Note that any adaptive content must be contained within an [**AdaptiveGroup**](./toast-schema.md#adaptivegroup). Otherwise it will not be rendered using adaptive.
321+
Note that any adaptive content must be contained within an [**AdaptiveGroup**](./notification-schema.md#adaptivegroup). Otherwise it will not be rendered using adaptive.
322322

323323

324324
### Columns and text elements

hub/apps/develop/notifications/app-notifications/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ This section provides design and implementation guidance for app notifications i
2727

2828
- [App notification UX guidance](toast-ux-guidance.md)
2929
- [App notification content](app-notifications-content.md)
30-
- [App notification content schema](toast-schema.md)
31-
- [Schedule an app notification](scheduled-toast.md)
30+
- [App notification content schema](notification-schema.md)
31+
- [Schedule an app notification](scheduled-notification.md)
3232

3333
## Additional app notifications features
3434

hub/apps/develop/notifications/app-notifications/toast-schema.md renamed to hub/apps/develop/notifications/app-notifications/notification-schema.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
description: The following article describes all of the properties and elements within toast content.
3-
title: Toast content schema
3+
title: App notification content schema
44
ms.assetid: 7CBC3BD5-D9C3-4781-8BD0-1F28039E1FA8
5-
label: Toast content schema
5+
label: App notification content schema
66
template: detail.hbs
77
ms.date: 05/19/2017
88
ms.topic: article
99
keywords: windows 10, windows 11, uwp, windows app sdk, winappsdk, app notification
1010
ms.localizationpriority: medium
1111
---
12-
# Toast content schema
12+
# App notification content schema
1313

1414

1515

@@ -42,7 +42,7 @@ ToastContent is the top level object that describes a notification's content, in
4242
| **ActivationOptions** | [ToastActivationOptions](#toastactivationoptions) | false | Additional options relating to activation of the app notification. |
4343
| **Scenario** | [ToastScenario](#toastscenario) | false | Declares the scenario your toast is used for, like an alarm or reminder. |
4444
| **DisplayTimestamp** | DateTimeOffset? | false | Override the default timestamp with a custom timestamp representing when your notification content was actually delivered, rather than the time the notification was received by the Windows platform. |
45-
| **Header** | [ToastHeader](#toastheader) | false | Add a custom header to your notification to group multiple notifications together within Action Center. |
45+
| **Header** | [ToastHeader](#toastheader) | false | Add a custom header to your notification to group multiple notifications together within Notification Center. |
4646

4747

4848
### ToastScenario
@@ -74,7 +74,7 @@ The generic binding is the default binding for toasts, and is where you specify
7474
|---|---|---|---|
7575
| **Children** | IList<[IToastBindingGenericChild](#itoastbindinggenericchild)> | false | The contents of the body of the Toast, which can include text, images, and groups. Text elements must come before any other elements, and only 3 text elements are supported. If a text element is placed after any other element, it will either be pulled to the top or dropped. And finally, certain text properties like HintStyle aren't supported on the root children text elements, and only work inside an AdaptiveSubgroup. |
7676
| **AppLogoOverride** | [ToastGenericAppLogo](#toastgenericapplogo) | false | An optional logo to override the app logo. |
77-
| **HeroImage** | [ToastGenericHeroImage](#toastgenericheroimage) | false | An optional featured "hero" image that is displayed on the toast and within Action Center. |
77+
| **HeroImage** | [ToastGenericHeroImage](#toastgenericheroimage) | false | An optional featured "hero" image that is displayed on the toast and within Notification Center. |
7878
| **Attribution** | [ToastGenericAttributionText](#toastgenericattributiontext) | false | Optional attribution text which will be displayed at the bottom of the app notification. |
7979
| **BaseUri** | Uri | false | A default base URL that is combined with relative URLs in image source attributes. |
8080
| **AddImageQuery** | bool? | false | Set to "true" to allow Windows to append a query string to the image URL supplied in the app notification. Use this attribute if your server hosts images and can handle query strings, either by retrieving an image variant based on the query strings or by ignoring the query string and returning the image as specified without the query string. This query string specifies scale, contrast setting, and language; for instance, a value of "www.website.com/images/hello.png" given in the notification becomes "www.website.com/images/hello.png?ms-scale=100&ms-contrast=standard&ms-lang=en-us" |
@@ -274,7 +274,7 @@ Controls the cropping of the app logo image.
274274

275275

276276
## ToastGenericHeroImage
277-
A featured "hero" image that is displayed on the toast and within Action Center.
277+
A featured "hero" image that is displayed on the toast and within Notification Center.
278278

279279
| Property | Type | Required |Description |
280280
|---|---|---|---|
@@ -460,11 +460,11 @@ Specify audio to be played when the app notification is received.
460460

461461

462462
## ToastHeader
463-
A custom header that groups multiple notifications together within Action Center.
463+
A custom header that groups multiple notifications together within Notification Center.
464464

465465
| Property | Type | Required | Description |
466466
|---|---|---|---|
467-
| **Id** | string | true | A developer-created identifier that uniquely identifies this header. If two notifications have the same header id, they will be displayed underneath the same header in Action Center. |
467+
| **Id** | string | true | A developer-created identifier that uniquely identifies this header. If two notifications have the same header id, they will be displayed underneath the same header in Notification Center. |
468468
| **Title** | string | true | A title for the header. |
469469
| **Arguments**| string | true | Gets or sets a developer-defined string of arguments that is returned to the app when the user clicks this header. Cannot be null. |
470470
| **ActivationType** | [ToastActivationType](#toastactivationtype) | false | Gets or sets the type of activation this header will use when clicked. Defaults to Foreground. Note that only Foreground and Protocol are supported. |
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
description: Learn how to schedule a local app notification to appear at a later time.
3+
title: Schedule an app notification
4+
label: Schedule an app notification
5+
template: detail.hbs
6+
ms.date: 07/28/2025
7+
ms.topic: how-to
8+
keywords: windows 10, windows 11, windows app sdk, winappsdk, uwp, scheduled toast notification, scheduledtoastnotification, how to, quickstart, getting started, code sample, walkthrough
9+
ms.localizationpriority: medium
10+
no-loc: [toast, Toast, app, App]
11+
---
12+
13+
# Schedule an app notification
14+
15+
You can schedule an app notification to appear at a later time, regardless of whether your app is running at that time. This is useful for scenarios like displaying reminders or other follow-up tasks for the user, where the time and content of the notification is known ahead-of-time.
16+
17+
Scheduled app notifications have a delivery window of 5 minutes. If the computer is turned off during the scheduled delivery time, and remains off for longer than 5 minutes, the notification will be "dropped" as no longer relevant to the user. If you need guaranteed delivery of notifications regardless of how long the computer was off, we recommend using a background task with a time trigger. For more information, see [Background tasks](/windows/apps/windows-app-sdk/applifecycle/background-tasks).
18+
19+
For more information about app notifications, see [App notifications overview](index.md).
20+
21+
22+
## Schedule the notification
23+
24+
To schedule a notification for a future time, use [**AppNotificationBuilder**](/windows/windows-app-sdk/api/winrt/microsoft.windows.appnotifications.builder.appnotificationbuilder) to define the notification content and the [**ScheduledToastNotification**](/uwp/api/Windows.UI.Notifications.ScheduledToastNotification) API to schedule it. The following example schedules a notification to appear 10 seconds from now.
25+
26+
```csharp
27+
using Microsoft.Windows.AppNotifications.Builder;
28+
using Windows.UI.Notifications;
29+
using Windows.Data.Xml.Dom;
30+
31+
var payload = new AppNotificationBuilder()
32+
.AddArgument("action", "viewItemsDueToday")
33+
.AddText("ASTR 170B1")
34+
.AddText("You have 3 items due today!")
35+
.BuildNotification()
36+
.Payload;
37+
38+
var doc = new XmlDocument();
39+
doc.LoadXml(payload);
40+
41+
var scheduledNotification = new ScheduledToastNotification(doc, DateTimeOffset.Now.AddSeconds(10));
42+
scheduledNotification.Tag = "18365";
43+
scheduledNotification.Group = "ASTR 170B1";
44+
45+
ToastNotificationManager.CreateToastNotifier().AddToSchedule(scheduledNotification);
46+
```
47+
48+
The **Tag** and **Group** properties act as a composite primary key for the notification. Setting these values enables you to cancel or replace the scheduled notification later, as shown in the next section.
49+
50+
51+
## Cancel scheduled notifications
52+
53+
To cancel a scheduled notification, retrieve the list of scheduled notifications from the [**ToastNotificationManager**](/uwp/api/Windows.UI.Notifications.ToastNotificationManager) and remove the one matching the tag you specified earlier.
54+
55+
```csharp
56+
var notifier = ToastNotificationManager.CreateToastNotifier();
57+
var scheduled = notifier.GetScheduledToastNotifications();
58+
59+
foreach (var notification in scheduled)
60+
{
61+
if (notification.Tag == "18365")
62+
{
63+
notifier.RemoveFromSchedule(notification);
64+
}
65+
}
66+
```
67+
68+
## See also
69+
70+
- [App notifications overview](index.md)

0 commit comments

Comments
 (0)