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 8174933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:35:26+00:00 2026-06-06T22:35:26+00:00

I am starting with MVVM. My application uses this pattern (PM pattern – let’s

  • 0

I am starting with MVVM.

My application uses this “pattern (PM pattern – let’s not debate this here 🙂 )”and works fine; The project is very simple and supposedly easy for beginners to get to grips with!! If only it was… 🙂

There is one thing which is puzzling me, which may have nothing to do with MVVM per se; the PropertyChangedEventHandler.

I am stepping through my code, line by line and can see the call (code below) but I’m not sure why I am calling this handler or what it is doing!

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Windows.Input;

namespace drMVVM.Model
{
    public class TextContent : INotifyPropertyChanged
    {
        private string text;
        public string Text
        {
            get { return text; }
            set
            {
                if (text != value)
                {
                    text = value;
                    OnPropertyChanged("Text");
                }
            }
        }

        private void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion
    }
}

I also have a similar layout of code for my viewmodel, but instead of setting the properties, I’m just creating an instance of the object and applying any additional logic.

Is the PropertyChangedEventArgs used to update just the properties of the model that something has changed? If so, why is it implemented in the model class and not just the ModelView? Is it because it can instinctively know whether to just listen for a change or to provide details a notification that a change occurs? If it’s a notification (I assume so hence the name of the interface) then what am I notifying in my Model class?

  • 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-06-06T22:35:28+00:00Added an answer on June 6, 2026 at 10:35 pm

    INotifyPropertyChanged is required whenever you want to notify someone about changes of your properties. So if your ViewModel needs to notify the view about changes so the view updates its data binding, then you ViewModel needs to implement it and raise the event with every change of the properties.

    Similar, if your model has properties that can change and you want to be notified about, then implement it in your model as well.

    It’s not really necessary for something, unless there are automated implications for it; one being the data binding in WPF which needs a hint so it knows that it has to update.

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

Sidebar

Related Questions

I'm starting to creat this project using MVVM Model. But I have no idea
My question is actually about starting an application with MVVM : My main screen
I am just starting to use commanding with MVVM in an application. I've found
I'm starting on my first WPF project using MVVM and Castle Windsor. I'm following
So I'm working in MVVM application & I'm starting to put some of the
I've found this text in Prism documentation . I'm starting on MVVM and I'm
I am starting a new MVVM project with WPF, both of which I am
I'm starting learn some web programming and picked up knockout.js because the MVVM pattern
Starting a foreigin Activity/Application is quite easy. Intent intentHandle = this.getPackageManager().getLaunchIntentForPackage(com.android.browser); this.startActivity(intentHandle); But is
i'm just starting with the mvvm model in Silverlight. In step 1 i got

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.