How to create a toe-strike notification within an application

Asked 2 years ago, Updated 2 years ago, 119 views

I would like to issue a toast-like notification from Windows 8 or later within the WPF application.
Please tell me the appropriate library and reference site.
The image looks like the video on the URL below, but it is not available because there are no references in Russian.

Image of the notification you want to create

c# wpf

2022-09-30 18:02

2 Answers

What do you think about the following?If you don't mind, go ahead.

Toast notification even on non.NET 4.5


2022-09-30 18:02

Recently, you can easily implement toast notifications by invoking Microsoft.Toolkit.Uwp.Notifications from WPF.

The steps I implemented in .NET Framework 4.6.1 are as follows:
.NET5 WPF app implementing interactive toast notifications.p>

  • For installation precautions, refer to the Official step to the Important column of the note
  • Supports .NET Framework 4.6.1 or later as of library version 7.0.2
  • Update the .NET Core 3.0 WPF app to .NET Core 3.1
  • Change TargetFramework to net 5.0-windows 10.0.17763.0 for .NET version 5 apps
  • Windows 10 SDK will not be referenced correctly without transitioning to PackageReference format
    • If the error "Must use PackageReference" appears, follow these steps to migrate to PackageReference
    • Right-click Browse in Solution Explorer
    • Click Migrate packages.config to PackageReference
    • Click OK
  • If the error "Must use PackageReference" appears, follow these steps to migrate to PackageReference
  • Right-click Browse in Solution Explorer
  • Click Migrate packages.config to PackageReference
  • Click OK
private void ToastButton_Click (object sender, RoutedEventArgse)
{
    new ToastContentBuilder()
        .AddText ("My Toast")
        .AddText("Hello Toast!")
        .Show();
}

Runtime Screenshot


2022-09-30 18:02

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.