Nov 13, 2012 at 1:59 PM
Edited Nov 13, 2012 at 2:16 PM
Thanks for the example. I was able to use it and converted to use Unity container. Manually set RegionManager was required to make my child window work, even you didn't need it in your example.
Now I'm trying to understand how this works. My child window is in the same location as Shell. Shell will recieve Prism events from different modules and open up child window with different views from those modules. I have this line in my
And in my ShellViewModel, in event subscriber:
//ChildWindow wizard = ServiceLocator.Current.GetInstance<Main.Views.ChildWindow>(); This works too
ChildWindow wizard = this._container.Resolve<Main.Views.ChildWindow>();
In this implementation, is "RegisterType" in the right place? Should "Resolve" and "SetRegionManger" for ChildWindow only run once, so they should not be in event subscriber?
Using "RegisterType" in Unity is going to register an instance? There is the same instance of ChildWindow evey time child window is opened?
Thanks for your help!