Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

What is the best way to communicate events between ViewModels in a .Net WPF MVVM application?

Posted on 2017-02-17
1
Medium Priority
?
251 Views
Last Modified: 2017-02-23
Hi:

I am creating  a .Net WPF application that is a dashboard.
I am implementing the dashboard using the MVVM framework.
I need the ability to communicate events between different View Models on the dashboard.
This to me feels like a pub/sub events model.

What is the best way to implement a solution which fits well with the MVVM FrameWork?
I started to look at Prism, but am wondering if that is a little heavy handed for my needs.

Can someone recommend a best practices approach and point me to some simple
examples of implementation?

Thanks,
JohnB
0
Comment
Question by:jxbma
1 Comment
 
LVL 2

Accepted Solution

by:
Steve Synan earned 2000 total points
ID: 42018632
For simple applications I like using MVVM Light Toolkit

It contains a Messenger object which really simplifies passing messages between decoupled view models.

Here's a link to the devs blog about the newer Messenger version, which might be a good place to start (plenty of examples can be found by doing a google search for 'MVVM Light Toolkit Messenger' as well).
1

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question