Solved

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

Posted on 2017-02-17
1
73 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP.NET MVC -Update model when click on <li> element 29 104
Convert Silverlight ERP To Angularjs,HTML5 3 109
Asp.Net Session Question 2 49
VB .net 2010 Byte array 2 24
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

751 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