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

  • Home
  • SEARCH
  • 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 8901659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:24:53+00:00 2026-06-15T01:24:53+00:00

This is a specific question about the MVVM pattern best practice. I’m using MvvmLight

  • 0

This is a specific question about the MVVM pattern best practice. I’m using MvvmLight Library.
It goes like this:
My model, say “Flight”, implements some business logic that can start, pause and stop flights via methods. Each method does its logic to make the functionality happen whether it’s playing stopping or pausing the flight. One important variable that changes is a status enum which indicates the flight status – playing, stopped, or paused. As said the status variable (and property) are defined in the Model.
On the other side the flight class is wrapped by a ViewModel class which contains a Status property that wraps the status variable in the flight model, and also RelayCommands that connect to the flight model play stop pause methods.

Here the problem begins:
When I execute one of the commands through the view, it executes the method in the model so that the status variable itself changes directly, but it only changes in the model.. The status property in the ViewModel doesn’t know whether the wrapped variable have been changed, as it was changed directly… That means if some view element is binded to the status property, it won’t change upon command execution..

I know several means to solve this but I’m asking for a fair solution that won’t break the MVVM pattern (like using INotifyPropertyChanged in the flight class in the Model )

  • 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-15T01:24:54+00:00Added an answer on June 15, 2026 at 1:24 am

    There is no magic bullet solution to this type of problem. Your ViewModel and Model need to be designed in a way that allows the information to propagate to the View; if this is not possible, then the design is flawed and needs to change.

    Here’s a couple of things you should look into:

    • If the Model’s state-modifying methods are documented to execute synchronously, create methods on the ViewModel that forward the action to the Model and then immediately query its state. Use these methods for the implementation of the RelayCommands.
    • If the Model’s methods are not synchronous then there should be some mechanism available to the Model’s clients to notify them when the methods have completed. This can be done through continuation callbacks, events, or perhaps even with INotifyPropertyChanged.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is not a question about a specific framework. I am using plain php
var playerClass = $(this).parent().attr('class') Question about only selecting a specific class from the dom.
This is kind of more generic question, isn't language-specific. More about idea and algorithm
My specific question is about using URLByAppendingPathComponent but the principle will be applicable to
this is not a question about a specific programming problem, it's about examining different
This is a bit of subjective question about a specific situation. Main goal for
Got a question about using mod_rewrite to redirect specific subdomains to use another domain.
This is a two part question. The first is a specific question about DataSets
This is a question about Application design rather than how-to-do specific actions. I am
This question arose when I was working on answering another question about best practices

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.