How to add event aggregation to an existing Silverlight application?

I have an existing Silverlight application where there are several buttons on the .xaml page that load user controls into the TransitioningContentControl host. Each of these user controls is associated with a viewmodel. Sometimes, when changes are made to one user control, data in others needs to be updated. I am considering using an event aggregator in Prism, but I do not want everything to be converted to shell, modules, etc. Is there a way to add event aggregation without going into Prism?

+4
source share
2 answers

You can use Prism's EventAggregator yourself - you do not need to change the application to host it, or you can use an alternative, such as Messenger , from the MVVM Light Toolkit . Links to additional alternatives and discussion can be found on Jeremy D. Miller's blog .

+4
source

Here you can find one example: Quick Start Events

+1
source

Source: https://habr.com/ru/post/1299373/


All Articles