How to use PRISM 4 in already developed silverlight 4 project using MVVM pattern?

Long story short : Prism is not a pattern, it's a library. Lookup a term : "BootStrapper" and registering types and instances within a "container" aka the UnityContainer in Prism. This is typically done in the Bootstrapper's overriden ConfigureContainer method.

There you "tell" the container what are the types that are going to be known to it from now on. Later you can re-use those already defined (and often instantiated) types when "resolving" other types. The container is smart enough to resolve all known dependencies that you pass through a ViewModel's constructor.

I'm sorry, but I'm currently unable to provide any examples because I'm travelling.

I have done this using MEF with Prism. I'm sure you could do it with Unity as well, but I have not used that before so can't tell you how it's done. The Prism Quickstarts on Modularity and EventAggregation is a good place to start.

Using MEF, I would pass values to the ViewModel via the constructor using the ImportingConstructor attribute, and use the EventAggregator for passing other data between loosely coupled ViewModels.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions