title: Will a DI-Container help this situation
body: <p>I writing a document editor of sorts. The application is written in WPF and needs to be able to handle multiple documents within the same process. Each document has its own editor window with is own Ribbon (kinda like the way Word does it).</p>
  
  <p>I would like to use DI patterns in the application, so f.ex. a "SaveManager" class could be injected with the document it is supposed to save. Obviously the container can't create the whole object graph at application start up, because the user may choose to open or create a new document at a later time. The "normal" way to handle this, is to use an abstract factory, but does that means i need a factory for every class that operates on the document. I'm expecting a lot of classes will need a reference to the document and I don't want to jump through hoops just for the sake of DI. Is there a way to let the container manage the documents life-time, handing out the right document instance at the right time.</p>
  
  <p>Best regards,<br/>
  Terje</p>