Events Between Views to Pass Data

Topics: Prism v2 - WPF 3.5
Oct 16, 2009 at 5:13 PM

If I use an event to show my popup by way of a factory class, would it makes sense to use another event to get the data back from the popup?

Oct 16, 2009 at 9:38 PM


How to implement the scenario above depends on your solution specifics.

If the Popup is in a different module than the component that should get the data back (so there are no references between them), using Event Aggregator events would be the way to go, but if the Popup is in the same module as the component it could get the data back you can use common .NET events.

Another possible scenario could be responding to user’s input, so a command might be best suiting.

Assuming the event to create the Popup is and EventAggregator event, you should take into account that the second action (the response to get the data) should not be meant as a response.  You can read more about that here (Event Aggregation section).

Below you can find another forum thread related to communication:

Please let me know if this helps.

Damian Schenkelman