wpf when application is closed notify icon in system tray remains Edit
In Windows forms or WPF application if we are using Notify Icon in the system tray before you close the application by issuing System.Windows.Application.Current.Shutdown(); set the NotifyIcon object's icon to null!