Force terminate a WPF application -


this question has answer here:

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();     } } 

Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -