This project is read-only.

Application LifeCycle

Apr 27, 2014 at 10:26 PM
Edited May 1, 2014 at 10:46 AM
After I press "x" in my main window, the session isn't terminated, and programm process is still in action.

I think, that the problem is in threading. So, I need to dispose my threads. I do that in "OnNavigatingFrom", but this event not rises when pressed "x".

What can I do? I cant be sure, what content would be loaded in window, when user would press "x".

M.b. I can somehow "hardkill" the programm?

UPD: Mb, I can override Dispose method of the content?
May 2, 2014 at 6:24 AM
Mb, I should put this to issues? I checked this problem again, and the problem is with new thread, which is created in NavigatinTo and not disposing, when i close main window.

So, either I should find event, which is rized on content when application is closed, either close code should be somehow stronger
May 2, 2014 at 6:49 AM

I finaly aded this code in mainwindow Closing handler:
but it looks not so pretty...