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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:57:44+00:00 2026-05-18T01:57:44+00:00

I am new to MVVM, and I am trying to implement a simple application,

  • 0

I am new to MVVM, and I am trying to implement a simple application, following the pattern.

For simplicity, I am breaking the problem down to it’s simplest form. If I manage to get this to work, I will have little trouble getting the application made.

The simple application consists of a tabcontrol. It is important that both tabs have their own ViewModel. However, they will get most of their data from the same source. The main issue is to get the second tab to know that the first have initiated a change on the datasource.

So, for simplicity, let’s just say that the model is holding a single integer. This integer needs initially to be set to 1.

The first tab is holding a textblock and a button. The text of the textblock is bound to the integer in the datamodel. Upon pressing the button, the integer in the moddel should be incremented with 1.

The second tab holds only a textblock, also bound to the integer in the datamodel. The challenge is to get this textblock to update along with the first textblock, but still being it’s own viewmodel.

I need somewhere central to store the values of the model, and in some way, let the viewmodels know that they have been updated, so their properties can be updated, and the Views therefore get’s updated accordingly.

Can someone explain in as much detail as possible how this is done? I have tried a billion different ways, but I am not getting it to work.

  • 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-18T01:57:44+00:00Added an answer on May 18, 2026 at 1:57 am

    Let me see if I have your question down right:

    • You have a data source (your model).
    • You have 2 view models.
    • View model 1 changes data in the model.
    • View model 2 needs to update with changes in the model.

    If that all sounds right, here’s one solution:

    Have your model implement INotifyPropertyChanged. When the integer changes, raise the PropertyChanged event. In view model 2, listen for the model’s PropertyChanged event. When it occurs, raise view model 2’s property changed event, and its UI will get updated automatically.

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

Sidebar

Related Questions

So I've been trying to implement the MVVM pattern within a simple WPF application
I'm trying to apply the MVVM design pattern to a diagramming application. In this
I am trying to implement MVVM in a new project (based on WPF &
I'm trying to use Prism and the MVVM pattern to develop an application. In
I'm trying to implement Menu in a Window using MVVM pattern. So I have
I am trying to implement a WPF MVVM application. And I am a beginner
This is more of a MVVM application design question. I'm trying to implement a
I'm writting a form in WPF/c# with the MVVM pattern and trying to share
I'm trying to implement IView for MVVM design pattern, which allows ViewModel to interact
I am kind of new to the whole MVVM pattern, and am trying to

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.