Usage for EventAggregator

Topics: Prism v2 - Silverlight 2
Jun 3, 2009 at 5:58 PM

Hi,


From the documentation I undestood that EventAggregator is used for communicating between Modules.  What should I use to communicate between Views within the same module ?

 

Thanks

Jun 3, 2009 at 7:09 PM
graphicsxp wrote:

From: graphicsxp

Hi,


From the documentation I undestood that EventAggregator is used for communicating between Modules.  What should I use to communicate between Views within the same module ?

 

Thanks

You could use normal .NET events defined on the interfaces.

Jammer



avast! Antivirus: Outbound message clean.

Virus Database (VPS): 090603-0, 03/06/2009
Tested on: 03/06/2009 19:10:04
avast! - copyright (c) 1988-2009 ALWIL Software.


Jun 5, 2009 at 3:30 AM

I don't see any reason why you can't use the EventAggregator between Views/ViewModels as well.  I think it is a much cleaner approach than using standard .Net events.  Just as I keep my modules decoupled, I try to keep my Views as decoupled as possible as well.  Adding standard events can cause event propagation from view to view in a very messy way.  The Event Aggregator pattern can really help with that.