I just spent a bit struggling to figure out why the sample from the latest Soup to Nuts WP7 post works fine when using the SimpleContainer but stopped working when I tried to replace the IOC. I finally narrowed it down to this line in the boostrapper's
container.RegisterInstance(typeof(INavigationService), null, new FrameAdapter(RootFrame));
The problem was I was also registering the INavigationService in my IOC as well but the FrameAdapter was not created at registration time like this. This caused my ViewModels to not be instantiated when a page was navigated to. I believe this has to do with
the fact that all of the event wiring for navigation is done in the constructor of the FrameAdapter class.
Another gotcha is that the ViewModels are sent to your IOC container as string keys and not as types. This works fine with the SimpleContainer recipe but if you are working with an IOC container which requires types this is a problem. I worked around this
by doing something like:
protected override object GetInstance(Type service, string key)
if (service == null && !String.IsNullOrEmpty(key))
service = Type.GetType("MyViewModelNamespace." + key);
I was able to work past both of these gotchas but I thought I would mention them here in case anybody else runs into them.