title: Using Prism with Ninject
body: <p>Is anyone out there using the <a href="http://compositewpf.codeplex.com/" rel="nofollow noreferrer">Prism framework</a> with Ninject instead of Unity? I need some functionality Unity isn't supporting yet, and I've decided to switch the IoC container to Ninject. I'm struggling a bit with the replace though.. </p>
  
  <p>What I need to use from Prism is the EventAggregator and the RegionManager. I have seen <a href="http://code.google.com/p/ninject-contrib/source/browse/trunk/CompositeWpf/NinjectContrib.CompositeWpf/" rel="nofollow noreferrer">this sample</a> that actually does the replace, but this is written for an older version of Prism, and several of the classes seems to have changed etc. So I ended up all confused after looking doing some effort in trying to rewrite it. </p>
  
  <p>So - my question is basically: <em>How can I replace Unity with Ninject?</em></p>
  
  <p>What are the necessary steps? Initially I assumed I could write a simple bootstrapper that creates and configures a Ninject container and uses this to resolve all other objects. I bind IEventAggregator to EventAggregator and IRegionManager to RegionManager, but it fails when creating the Shell and the RegionManager.CreateRegion is called. Problem is that it seems like I need to set a ServiceLocator somewhere as it fails on this line: </p>
  
  <pre><code>IServiceLocator locator = ServiceLocator.Current;
  </code></pre>
  
  <p>Any ideas and tips along the way? </p>