EventAggregator and CancelEventArgs

Topics: Prism v2 - WPF 3.5
Mar 10, 2010 at 8:29 PM

I am using EventAggregator to puslish an event before taking an action and need to check if any of the subscriber(s) wants to stop that action.

E.g from WebBrowser before navigating to a Url it fires an event saying I am about to navigate to UrlX now lets say ModuleX is listening to that event and it performs a check to see if Url is safe to go to or not, or another module is checking if url is valid or not etc etc.

As I understand all events are published asynchronous using EventAggregator, so how can I accomplish CancelEventArgs like functionality.


PS: My application is in WPF.


Mar 12, 2010 at 2:35 PM
Edited Mar 12, 2010 at 2:35 PM


A similar scenario has been discussed in this thread. Perhaps you might find it useful for your situation.

Please let me know if this helps.

Guido Leandro Maliandi


Mar 13, 2010 at 3:38 PM



Thanks, that was what I was looking for.