Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7023877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:46:01+00:00 2026-05-27T23:46:01+00:00

I am using MVVM and I would like to communicate between viewmodels. I have

  • 0

I am using MVVM and I would like to communicate between viewmodels. I have a user control that contains another user control inside it, and I would like the parent usercontrol to run some code when a property in the child is changed. I have seen several ways to communicate between viewmodels, such as using MVVM Light Messenger, or PRISM Event Aggregator, but I was hoping there was some way to accomplish this simply by somehow subscribing to the PropertyChanged event raised through the INotifyPropertyChanged implementation.

There is an answer by Matt Hamilton in this post but I have trouble implementing it because it needs a DependencyObject, and my ViewModels are POCOs rather than DOs

Is there some way of using the INotifyPropertyChanged system, as I would prefer to not have to implement a messaging system. If not is a messaging system the best? I also saw an example where some guy just used the code behind of the view to help pass the property, however I don’t want to break the MVVM pattern as I wanna do some testing at a later stage.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:46:02+00:00Added an answer on May 27, 2026 at 11:46 pm

    There definately multiple ways to handle your scenario. One is certainly to use the INotifyPropertyChanged implementation to propogate your event. The issue is that container would need a direct reference to the child ViewModel to subscribe to the PropertyChanged event.

    class ParentVM
    {
    private const string SomePropertyName = “SomeProperty”;

        public ParentVM()
        {
            ChildVM child = new ChildVM();
            child.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(child_PropertyChanged);
        }
    
        void child_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            if (e.PropertyName == SomePropertyName)
            {
                //Do something!!!
            }
    
        }
    }
    

    You could also explicitly define an event and subscribe to it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using MVVM's SimpleIoc, I would like to register an implementation for a given interface,
I am using MVVM Light toolkit in my WPF application. I would like to
I have a ObservableCollection> property that I would like to display in a list
I'm using Mark Smith's Julmar MVVM-Helpers library in an application and would like to
I've got a MVVM-like situation (not using any frameworks) where I have a main
First of all, I'm using MVVM for this and I would like to continue
I'm using MVVM to bind views to objects in a Tree. I have a
I am using MVVM architecture. I have a usercontrol UC as a View Model
I'm developing a WPF app using MVVM. Most of my views have only xaml
I'm trying to implement a WPF application using MVVM (Model-View-ViewModel) pattern and I'd like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.