title: How can I set up the container for a wpf application to share dependencies per graph
body: <p>I have a fairly well structured and large wpf mvvm application which uses castle windsor as a container. </p>
  
  <p>My root has a mix of actions with typed factories and repositories.
  I would like all my actions to have shared dependencies per graph.</p>
  
  <p>If all my actions only used typed factories which crated view models this would be easy with registering the repositories with BoundTo &lt; ViewModelBase > ()...</p>
  
  <p>My current solution uses
  BoundTo&lt; Object >() which has it's downsides, for example, all the root actions share repositories.</p>
  
  <p>I have searched for solutions but not found any.
  I would prefer to use castle windsor as my container.
  Can anyone help me with this?</p>