Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

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
?
207 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 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

Create CentOS 7 Newton Packstack Running Keystone

A bug was filed against RDO for the installation of Keystone v3. This guide is designed to walk you through the configuration for using Keystone v3 with Packstack. You will accomplish this using various repos and the Answers file.

Question has a verified solution.

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

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

719 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