Hi,
Based on your scenario, I believe that what you want is to raise an equal event on a scoped EventAggregator so it doesn't affect other Views globally. If that is the case, it would be better for you to change your approach of implementing several EventAggregators (since it is much more complicated to implement) for a simpler one: subscription filtering. This filtering lets you decide if the handler of the subscriber gets executed based on the payload from the event. The following is an example where the Filter parameter (the last parameter of the subscription), every time the event is published, determines if the payload of the event matches a criteria to decide if the subscriber callback get executed or not:
This way you won't need more EventAggregators than the one provided by your container and, when you raise an event (global message), you will be able to decide which of the subscribers of that event will handle it and which not.
For more information on how to implement subscription filtering, you can refer to the following section of the Prism documentation:
Hope this helps,
Federico Martinez
http://blogs.southworks.net/fmartinez
Based on your scenario, I believe that what you want is to raise an equal event on a scoped EventAggregator so it doesn't affect other Views globally. If that is the case, it would be better for you to change your approach of implementing several EventAggregators (since it is much more complicated to implement) for a simpler one: subscription filtering. This filtering lets you decide if the handler of the subscriber gets executed based on the payload from the event. The following is an example where the Filter parameter (the last parameter of the subscription), every time the event is published, determines if the payload of the event matches a criteria to decide if the subscriber callback get executed or not:
FundAddedEvent fundAddedEvent = this.eventAggregator.GetEvent<FundAddedEvent>(); fundAddedEvent.Subscribe(FundAddedEventHandler, ThreadOption.UIThread, false, fundOrder => fundOrder.CustomerId == this.customerId);
For more information on how to implement subscription filtering, you can refer to the following section of the Prism documentation:
Hope this helps,
Federico Martinez
http://blogs.southworks.net/fmartinez