Scheduled local Windows toast notifications for .NET MAUI apps using the pure WinRT API (Windows.UI.Notifications) — no external NuGet packages required.
This sample shows how to build and schedule toast notifications (via ScheduledToastNotification) from a MAUI Windows app. It uses simple toast XML, works with MSIX packaging, and keeps the code minimal and easy to follow.
- 🔔 Local toast notifications via WinRT
- ⏰ Scheduled notifications (e.g., "in 1 minute")
- 🧩 No dependency on Microsoft.WindowsAppSDK or CommunityToolkit
- 📝 Simple UI to type a message and schedule the toast
- 🧪 Debug-friendly when MSIX packaging is enabled
- Windows 10 or 11
- Visual Studio 2022 with .NET MAUI workload installed
- MSIX packaging enabled (required for toasts to appear in Debug)
Why MSIX? Windows associates toast permissions with an App Identity. MSIX provides that identity automatically.
- 
Clone the repository and open the solution in Visual Studio 2022. 
- 
Target Windows. 
- 
Enable MSIX packaging for the Windows head project: - Project → Properties → Windows → check ✅ Create App Packages (MSIX) (On some VS versions this is labeled "Package using MSIX".)
 
- 
Build & Run the app. 
- 
Type a message, click Send, then close the app. The toast will appear at the scheduled time. 
Platforms/Windows/LocalNotification.cs   # Core logic for scheduled toasts via WinRT
MainPage.xaml                            # UI with input field & button
MainPage.xaml.cs                         # Calls LocalNotification.Schedule(...)
// Schedule a notification for 1 minute from now
WinRT_API_LocalNotification.Platforms.Windows.LocalNotification.Schedule(
    "Reminder",
    "Time for a coffee",
    DateTime.Now.AddMinutes(1));- 
No toast shows in Debug Ensure MSIX packaging is enabled (see Quick Start, step 3). Without package identity the notifier may fail silently. 
- 
Nothing appears at the scheduled time Verify the scheduled time is in the future (system clock, time zones). The code checks this and throws if it isn't. 
- 
Focus Assist / Do Not Disturb If Windows Focus Assist (Do Not Disturb) is on, toasts may be suppressed. 
- 
Second run crash (previous experiments) Only create notifiers and schedule toasts after the app is launched (e.g., in OnLaunchedorMainPage.OnAppearing). Avoid doing this in the app constructor.
- This sample focuses on scheduled local toasts with minimal plumbing.
- No click/activation handling out of the box. Add a COM activator + manifest if you need to process user actions from the toast.
- For unpackaged desktop scenarios you would need additional AppUserModelID shortcut registration; this sample favors the simpler MSIX path.
MIT — see LICENSE file if provided.
Microsoft.Windows.AppNotifications (Windows App SDK) does not support scheduled toasts. This repo demonstrates a practical, lightweight approach using WinRT directly from a MAUI Windows app.