|
using System.Windows;
using Hardcodet.Wpf.TaskbarNotification;
namespace Windowless_Sample
{
/// <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);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.