private void GracefulExit() { Window1 mwindow = LifetimeService.Instance.Container.Resolve<Window1>(); mwindow.IsException = true; mwindow.Close(); }