Force terminate a WPF application -
this question has answer here: how exit wpf app programmatically? 14 answers i need terminate running wpf application (e.g. wpf.exe). app did override onclosing event doing following protected override void onclosing(canceleventargs e) { e.cancel = true; } i tried "taskkill /f /im wpf.exe" still doesn't terminate it. how can force terminate app? rather doing protected override void onclosing(canceleventargs e) { e.cancel = true; } try void window_closing(system.componentmodel.canceleventargs e) { iclosing context = datacontext iclosing; if (context != null) { e.cancel = !context.onclosing(); } }