Added .NET 5.0 and restructured the repository. (#47)

This commit is contained in:
Robin Krom
2020-11-22 22:04:27 +01:00
committed by GitHub
parent de6a2b2e25
commit 9e86ac77d3
100 changed files with 201 additions and 184 deletions

View File

@@ -0,0 +1,27 @@
using System.Windows;
using Hardcodet.Wpf.TaskbarNotification;
namespace NotifyIconWpf.Sample.Windowless
{
/// <summary>
/// Simple application. Check the XAML for comments.
/// </summary>
public partial class App : Application
{
private TaskbarIcon notifyIcon;
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
//create the notifyicon (it's a resource declared in NotifyIconResources.xaml
notifyIcon = (TaskbarIcon) FindResource("NotifyIcon");
}
protected override void OnExit(ExitEventArgs e)
{
notifyIcon.Dispose(); //the icon would clean up automatically, but this is cleaner
base.OnExit(e);
}
}
}