On Application.Close() instead of closing main window only it is better to close everything we can - there can be more than one window, e.g. in case of multi-threaded UI case.
Merge pull request #184 from ivan-danilov/close-app

Close all windows on Application close, not just main one