I am developing an application with c# using WPF under vs2013.
When the application is minimized, the application icon disappears in the taskbar in a random manner (very rare occurrence, and seems happening more often when the system is slow). The application can only be restored by 'alt+tab' combination.
In the minimization key event handler, I added ShowInTaskbar = true
, which does not help.
I list below the minimization handler.
The WindowStyle
property of the main window is set to None
in order to draw our custom "minimize", "maximize", and "close" buttons.
public void minimize_MouseDown()
{
var main = ViewManager.GetInstance().main;
main.WindowState = WindowState.Minimized;
main.ShowInTaskbar = true;
}