Skip to content

Commit f0e3775

Browse files
drewbatgitCopilot
andcommitted
Rewrite quickstart with WinUI activation pattern, fix COM exe path
- Rewrite quickstart for WinUI with C#/C++ tabs - Add foreground launch and background action activation scenarios - Fix COM ExeServer Executable path (remove incorrect subdirectory prefix) - Add notification button for background action demo - Remove Step 5/6 and Additional features (saved for relocation) - Delete inlined include files - Update index.md and send-local-toast pages Co-authored-by: Copilot <[email protected]>
1 parent 7f99250 commit f0e3775

11 files changed

Lines changed: 363 additions & 523 deletions

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

Lines changed: 272 additions & 457 deletions
Large diffs are not rendered by default.

hub/apps/develop/notifications/app-notifications/includes/desktop-toast-activation-code.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

hub/apps/develop/notifications/app-notifications/includes/desktop-toast-activation-sequence.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

hub/apps/develop/notifications/app-notifications/includes/images-note.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

hub/apps/develop/notifications/app-notifications/includes/nuget-package-dotnet-warnings.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

hub/apps/develop/notifications/app-notifications/includes/onlaunched-warning.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

hub/apps/develop/notifications/app-notifications/includes/send-toast-basic-toast-intro.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

hub/apps/develop/notifications/app-notifications/includes/send-toast-intro.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: App notifications overview
33
description: Overview of Windows App SDK App Notifications
44
ms.topic: concept-article
5-
ms.date: 07/28/2025
5+
ms.date: 03/01/2026
66
keywords: toast, notification
77
ms.localizationpriority: medium
88
no-loc: [toast, Toast, app, App]
@@ -11,7 +11,7 @@ no-loc: [toast, Toast, app, App]
1111

1212
![A screen capture showing an app notification above the task bar. The notification is a reminder for an event. The app name, event name, event time, and event location are shown. A selection input displays the currently selected value, "Going". There are two buttons labeled "RSVP" and "Dismiss"](images/shell-1x.png)
1313

14-
App notifications (also called _toast_ notifications) are messages that your app can construct and deliver to your user while they are not currently inside your app. The notification content is displayed in a transient window in the bottom right corner of the screen and in the Notification Center (called Action Center in Windows 10). App notifications can be used to inform the user of application status or state changes, or to prompt the user to take an action. App notifications can either be sent locally or from a cloud service using [push notifications](../push-notifications/index.md).
14+
App notifications are messages that your app can construct and deliver to your user while they are not currently inside your app. The notification content is displayed in a transient window in the bottom right corner of the screen and in the Notification Center. App notifications can be used to inform the user of application status or state changes, or to prompt the user to take an action. App notifications can either be sent locally or from a cloud service using [push notifications](../push-notifications/index.md).
1515

1616
> [!NOTE]
1717
> The term "toast notification" is being replaced with "app notification". These terms both refer to the same feature of Windows, but over time we will phase out the use of "toast notification" in the documentation.

hub/apps/develop/notifications/app-notifications/send-local-toast-cpp-uwp.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ no-loc: [toast, Toast, app, App]
1212
---
1313
# Send a local app notification from C++ UWP apps
1414

15-
[!INCLUDE [intro](includes/send-toast-intro.md)]
15+
An app notification is a message that your app can construct and deliver to your user while they are not currently inside your app.
16+
17+
<img src="images/toast-notification.png" width="628" alt="Screenshot of an app notification"/>
18+
19+
This quickstart walks you through the steps to create, deliver, and display a Windows 11 app notification using rich content and interactive actions. This quickstart uses local notifications, which are the simplest notification to implement. Many types of Windows apps including WinUI, WPF, WinForms, and console, can send notifications with the [Windows App SDK](/windows/apps/windows-app-sdk/).
1620

1721
> [!NOTE]
1822
> The term "toast notification" is being replaced with "app notification". These terms both refer to the same feature of Windows, but over time we will phase out the use of "toast notification" in the documentation.
@@ -32,7 +36,11 @@ using namespace Windows::Data::Xml::Dom;
3236
3337
## Step 2: Send an app notification
3438
35-
[!INCLUDE [basic toast intro](includes/send-toast-basic-toast-intro.md)]
39+
In Windows 10 and Windows 11, your app notification content is described using an adaptive language that allows great flexibility with how your notification looks. For more information, see the [App notification content](adaptive-interactive-toasts.md) documentation.
40+
41+
We'll start with a simple text-based notification. Construct the notification content and show the notification! You can use the [Windows App SDK](/windows/windows-app-sdk/api/winrt/microsoft.windows.appnotifications.builder) `AppNotificationBuilder` APIs.
42+
43+
<img alt="Simple text notification" src="images/send-toast-01.png" width="364"/>
3644
3745
Construct the XML app notification template, populate it with text and values, construct the notification, and show it.
3846
@@ -88,7 +96,8 @@ void App::OnActivated(IActivatedEventArgs^ e)
8896
}
8997
```
9098
91-
[!INCLUDE [OnLaunched warning](includes/onlaunched-warning.md)]
99+
> [!IMPORTANT]
100+
> You must initialize your frame and activate your window just like your **OnLaunched** code. **OnLaunched is NOT called if the user clicks on your app notification**, even if your app was closed and is launching for the first time. We often recommend combining **OnLaunched** and **OnActivated** into your own `OnLaunchedOrActivated` method since the same initialization needs to occur in both.
92101
93102
## Activation in depth
94103
@@ -127,7 +136,8 @@ toastNotifier.Show(notif);
127136

128137
You can add rich content to notifications. We'll add an inline image and a profile (app logo override) image.
129138

130-
[!INCLUDE [images note](includes/images-note.md)]
139+
> [!NOTE]
140+
> Images can be used from the app's package, the app's local storage, or from the web. As of the Fall Creators Update, web images can be up to 3 MB on normal connections and 1 MB on metered connections. On devices not yet running the Fall Creators Update, web images must be no larger than 200 KB.
131141
132142
<img alt="App notification with images" src="images/send-toast-02.png" width="364"/>
133143

0 commit comments

Comments
 (0)