There is a new API in the Windows 8.1 ApplicationView namespace. The ApplicationView.Consolidated | consolidated event. MSDN
Description: Occurs when the window is removed from the list of recently used apps or if the user executes a close gesture on it.
MSDN docs are a little vague. Is this an API developers can use to detect when their application has been terminated by the user or by the system? What is a scenario to handle this event?