I have been using Prism's Viewmodel locator to instantiate my viewmodels using the prism naming conventions.I have come unstuck because I have created a user control with it's own viewmodel which I communicate with other viewmodels using the Prism Event Aggregator this is working nicely but I want to create other instances of this user control. Using the event aggregator all instances of the user control are obviously subscribing to the events published so:
- How do I differentiate the actual user control that I want to target.
- How do instantiate a viewmodel and target a view datacontext without using viewmodel locator?