I have a .ico file that is embedded as a resource (build action set to resource). I am trying to create a NotifyIcon. How can I reference my icon?
notifyIc
A common usage pattern is to have the notify icon the same as the main window's icon. The icon is defined as a PNG file.
To do this, add the image to the project's resources and then use as follows:
var iconHandle = MyNamespace.Properties.Resources.MyImage.GetHicon();
this.notifyIcon.Icon = System.Drawing.Icon.FromHandle(iconHandle);
In the window XAML: