protected override void OnExit(ExitEventArgs e) { UIApplication.Close(); ApplicationContext.Close(); base.OnExit(e); }