How to use Toast notifications in Windows App SDK 1.4?

Starcloudsea 60 Reputation points
2023-09-25T08:52:17.4633333+00:00

I want to use Toast notifications in Windows App SDK 1.4 (below) but I don't know how to create them, most of the tutorial codes I've seen on the internet are not the same, and although they all work, they have the same feature: "Creates a new window when the notification is clicked", why? I don't want to create a window, I want to wake up the window, or customize the event.

User's image

As well, I found out that I can put buttons into notifications, I tried it once and the buttons show up normally, but when I click on the button it creates a window, I don't want that, I want a specific event to be triggered when the button is pressed, is there a solution for that?

Lastly, I realized that this method in the picture is reporting an error, I think this is the method that manages what triggers when the button inside the notification is pressed, but since it's wrong, I can't be sure of its accuracy.

These are my issues, I hope you guys can help me out, thanks!(。・ω・。)

User's image

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,786 questions
Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
778 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,827 questions
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 84,286 Reputation points
    2023-09-25T09:00:54.14+00:00

    It works with the Microsoft.Toolkit.Uwp.Notifications NuGet package, as explained at

    Send a local toast notification from a C# app

    or

    Schedule a toast notification

    (tested with Windows App SDK 1.4, Windows 10 22H2, Unpackaged)


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.