The usual way to inject dependencies into the ViewModel, assuming it is created through the Unity container (so it goes through the Builder’s pipeline), is using
Constructor Injection. You can find many examples of this in the
Reference Implementation that come with Prism.
Another possible scenario could be that the ViewModel is instantiated through its default constructor as it is declared in XAML (an assigned to the view’s
DataContext). If this is the case, you probably will need to use the
Service Locator to get the different dependencies of your
This thread provides some more information about that.
If by “setting initial parameters” you meant something different please provide some more information about what you are trying to achieve so we can provide a more detailed answer.
Please let me know if this helps.