Skip to content

Commit 6c2851b

Browse files
drewbatgitCopilot
andcommitted
Update content, titles, cross-links; delete legacy pages
- Titles changed to 'Use app notifications with a [framework] app' - Removed toast terminology notes - Updated intro descriptions across all pages - Removed step numbers from headings - Replaced framework-specific notes with cross-links to index - Added push notification cross-links - Removed duplicate feature sections (buttons, images) in favor of cross-link to adaptive-interactive-toasts.md - Deleted 4 legacy pages (csharp, cpp-uwp, cpp-wrl, other-apps) - Updated TOC and index.md Co-authored-by: Copilot <[email protected]>
1 parent bcb5b83 commit 6c2851b

11 files changed

Lines changed: 63 additions & 1437 deletions

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

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
---
2-
title: Send a local app notification from a console app
2+
title: Use app notifications with a console app
33
description: Learn how to send a local app notification from a .NET console app and handle the user clicking the notification using the Windows App SDK.
44
ms.date: 04/08/2026
55
ms.topic: how-to
66
keywords: windows 11, windows 10, windows app sdk, winappsdk, console, send app notifications, notifications, toast notifications, how to, quickstart, c#, csharp
77
ms.localizationpriority: medium
88
---
99

10-
# Send a local app notification from a console app
10+
# Use app notifications with a console app
1111

12-
An app notification is a message that your app can construct and deliver to your user while they are not currently inside your app.
12+
An app notification is a UI popup that appears outside of your app's window, delivering timely information or actions to the user. Notifications can be purely informational, can launch your app when clicked, or can trigger a background action without bringing your app to the foreground.
1313

1414
:::image type="content" source="images/toast-notification.png" alt-text="Screenshot of an app notification" width="628":::
1515

16-
This article walks you through the steps to send and handle app notifications from a .NET console app using the [Windows App SDK](/windows/apps/windows-app-sdk/). The Windows App SDK `Microsoft.Windows.AppNotifications` APIs handle all the complexity of notification registration and activation for both packaged and unpackaged apps.
16+
This article walks you through the steps to create and send an app notification from a .NET console app, and then handle activation when the user interacts with it. This article uses the [Windows App SDK](/windows/apps/windows-app-sdk/) `Microsoft.Windows.AppNotifications` APIs.
1717

18-
> [!NOTE]
19-
> For WinUI apps, see [Quickstart: App notifications in the Windows App SDK](app-notifications-quickstart.md). For other app types, see [WPF](app-notifications-wpf.md), [WinForms](app-notifications-winforms.md), or [UWP](app-notifications-uwp.md).
18+
For an overview of app notifications and guidance for other frameworks, see [App notifications overview](index.md).
19+
20+
This article covers local notifications. For information about delivering notifications from a cloud service, see [Push notifications](../push-notifications/index.md).
2021

2122
> [!IMPORTANT]
2223
> Notifications for elevated (admin) apps are not currently supported.
@@ -46,7 +47,7 @@ For unpackaged apps, add:
4647
<WindowsPackageType>None</WindowsPackageType>
4748
```
4849

49-
## Step 1: Register for app notifications
50+
## Register for app notifications
5051

5152
In your `Main` method, register the `NotificationInvoked` handler *before* calling `Register()`. The console app must remain running to receive activation callbacks when notifications are clicked.
5253

@@ -72,7 +73,7 @@ AppNotificationManager.Default.Register();
7273
> [!NOTE]
7374
> For unpackaged apps, `Register()` automatically sets up the COM server registration that allows Windows to launch your app when a notification is clicked. You don't need to configure COM activation or an AUMID manually.
7475
75-
## Step 2: Send an app notification
76+
## Send an app notification
7677

7778
Use the `AppNotificationBuilder` API to construct and send a notification.
7879

@@ -88,7 +89,7 @@ var notification = new AppNotificationBuilder()
8889
AppNotificationManager.Default.Show(notification);
8990
```
9091

91-
## Step 3: Keep the app running
92+
## Keep the app running
9293

9394
For the `NotificationInvoked` handler to be called, the console app must still be running when the user clicks the notification. If the app exits before the user interacts with the notification, the next click will cold-launch a new process.
9495

@@ -146,3 +147,5 @@ AppNotificationManager.Default.Unregister();
146147
- [AppNotificationBuilder Class](/windows/windows-app-sdk/api/winrt/microsoft.windows.appnotifications.builder.appnotificationbuilder)
147148

148149

150+
151+

0 commit comments

Comments
 (0)