Aug 5, 2010 at 8:36 PM
Edited Aug 5, 2010 at 9:14 PM
I do not know you exact scenario, but if you need to create different instances of your View, you could take advance of the
in Prism by using the following approaches:
Both approaches could guarantee to you the creation of new instances of the view, as long as the singleton pattern wouldn't been used for its creation.
As for your second question, this might be achieved by applying filters when you call the Subscribe method.
In other words, you could notify your ViewB when it is displayed into RegionA or RegionC by implementing this on your own. And when you publish your
event, you could use this information as an argument. So, when you call the
Subscribe method, you could specify a predicate for filtering those event’s raises that shouldn’t be treated, as shown in the following code lines:
fundAddedEvent.Subscribe(FundAddedEventHandler, ThreadOption.UIThread, false,
public bool FundOrderFilter(FundOrder fundOrder)
return fundOrder.CustomerId == _customerId;
For more information you could take a look at the
EventAggregator Quickstart (see the ActivityPresenter class code line: 68).
Please let me know if this helps.