Quantcast
Viewing latest article 16
Browse Latest Browse All 21

New Comment on "How to: bi-directional communication between different windows/views"

And if instead different views wants to communicate each other creating a group of views let's say a context, to avoid a broadcasted message to change all the views in the application, but just the one that are in the same context, how do you think is a good way to resolve this? For example let's think about a simple master detail application, a view containing the master rows, and a view containing the detail panel. The master broadcast MasterSelectedMessage when the user select a master row. For some reason I would like to decouple those views, so I can reuse the master view for another kind of detail view and all the detail views know how to subscribe and act on MasterSelectedMessage: MasterView - MasterViewModel DetailView - DetailViewModel MasterSelectedMessage ...and another detail view that can respond to the same master selected message: AlternativeDetailView - AlternativeDetailViewModel then think about to have a couple of master-detail visible somewhere, in the same view, or different tab, or again different widows to support multiple monitors: context1[ <MasterView> <DetailView> ] context2[ <MasterView> <AlternativeDetailView> ] when the master broadcast the message MasterSelectedMessage, both viewmodels DetailViewModel and AlternativeDetailViewModel, receive the message and change the detail panel according to the selectedItem present in the message, but actually I want to group one MasterViewModel with the DetailViewModel and another MasterViewModel with the AlternatvieDetailViewModel, so they can act separately. In other words, if I select a master row of context1, I want that the message is consumed just by the DetailView of the context1 Is there any token or context in the radical ui composition implementation?

Viewing latest article 16
Browse Latest Browse All 21

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>