void Window_Closing(object sender, CancelEventArgs e) { Process currentProcess = Process.GetCurrentProcess(); ProcessUtilities.KillProcessAndChildren(currentProcess.Id); //e.Cancel = true; }