How to register Windows Forms with Simple Injector
Background I'm building a winforms application where I am using an IoC container (SimpleInjector) to register my types. In my application, a majority of the screens (i.e. forms) will only have one instance at any given time. Problem For forms that only need one instance at any given time, I can register them as singletons: container.Register<IHomeView, HomeView>(Lifestyle.Singleton); This allows me to use the container to keep track of all forms. In this case, however, when a form gets closed it will then get disposed (forms implement IDisposable). If the application tries to open that form