We have application that uses the Prism library. The application has the WorkSpace region represented with the tab control which allows opening several instances of the same view at the same time (like mdi application).
What is a way to implement the following scenario:
searchViewModel1, filterViewModel1, resultViewModel1
and
searchViewModel2, filterViewModel2, resultViewModel2.
When user clicks the “Apply Filter” button in the first tab, the filterViewModel1 should notify the resultViewModel1 to reload data.
But I am not sure, how we can notify the resultViewModel1 only, but not the resultViewModel2?
If I will use the event aggregator, the both resultViewModel1 and resultViewModel2 will be subscribed to refresh event....
![Image]()
What is a way to implement the following scenario:
-
We have SearchView which contains FilterView and ResultView child views.
-
We have several instances of the SearchView which opened in different tabs.
-
Since we use the view-first approach the view model will be created in background for each of views. But view models will have no relations among themselves in this case, (it seems to be my main problem).
searchViewModel1, filterViewModel1, resultViewModel1
and
searchViewModel2, filterViewModel2, resultViewModel2.
When user clicks the “Apply Filter” button in the first tab, the filterViewModel1 should notify the resultViewModel1 to reload data.
But I am not sure, how we can notify the resultViewModel1 only, but not the resultViewModel2?
If I will use the event aggregator, the both resultViewModel1 and resultViewModel2 will be subscribed to refresh event....
