private void App_Exit(object sender, ExitEventArgs e) { try { AppVM.Close(); MessageHandlers.UnregisterMessageHandlers(this); } catch (Exception ex) { ExceptionUtils.HandleException(ex); } }