Solved

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

Posted on 2017-02-17
1
41 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 500 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

685 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