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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:10:27+00:00 2026-05-29T06:10:27+00:00

The application I’m currently writing is using MVVM with the ViewModel-first pattern. I have

  • 0

The application I’m currently writing is using MVVM with the ViewModel-first pattern. I have XAML similar to the following:

<ContentControl Content="{Binding FooViewModel.BarViewModel.View, Mode=OneWay}"/>

Every VM is a DependencyObject. Every property is a DependencyProperty. Depending upon the state of the application, the value of the BarViewModel property of the FooViewModel can change, thus changing the value of the View property. Unfortunately when this happens, the new view is not displayed, and the old one remains.

This is extremely frustrating. I thought that if any part of a path expression changed, the binding would update, but that doesn’t appear to be the case. When I’ve used shallower path expressions, such as FooViewModel.View and I’ve changed the value of the FooViewModel property, that has updated the ContentControl to which it’s bound, but not in this case.

If your solution is that I abandon ViewModel-first, that is not an option, though I appreciate your advice. I must get this working as is.

CLARIFICATION

This is a question about data binding, and not about MVVM or how to implement it. You can safely ignore the MVVM aspects of this if it helps you to think about the problem, or if you have a different idea about how MVVM should be implemented. This is a large, existing project in which the MVVM design pattern cannot be changed. (It is far too late for that.)

So, with that said, the correct question to be answering is the following:

Given a binding path expression in which every element is a DependencyProperty and the final property is a view bound to a ContentControl, why does a change in a property in the middle of the path not cause the binding to update?

  • 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-29T06:10:28+00:00Added an answer on May 29, 2026 at 6:10 am

    Although I would expect this to work, there are several problems with your approach.

    Firstly, your view models should not use DependencyObject or DependencyProperty, this ties them in to WPF. They should instead implement INotifyPropertyChanged. This makes your view models reusable in other presentation technologies such as Silverlight.

    Secondly, your view models shouldn’t have references to your views, so you shouldn’t require a View property on your view models.

    I would seriously consider using an MVVM framework for view composition – Caliburn.Micro, for example, makes view model first development extremely straightforward, and already provides a view model base class which implements INotifyPropertyChanged, and a mechanism for building view compositions with conventions.

    I.e. you can have a conductor view model which has an ActiveItem property, and you simply place a ContentControl on your view with the same name as the property:

    <ContentControl x:Name="ActiveItem" />
    

    You can use the ActivateItem() method to change the current active item.

    Caliburn.Micro also has a host of other features, such as being able to place a Button control with x:Name="Save" on your view, and your Save method on your view model will automatically be invoked when the button is clicked.

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

Sidebar

Related Questions

Application uses Entity Framework 4.1 with database first approach. I have in database a
Application configuration: Web application using java first method of creating JAX-WS 2.0 Web Services
Application is asp.net MVC. I want to put a textbox for date using mask.
my application use 10 threads that to read a lot of html file.similar the
my application has the following database structure: Transactions: - TransactionID (PK, Identity) - Type
my application has the following structure: public class Transaction { public int TransactionID {
My application ( main.exe ) is executing a Child process ( child.exe ) using
Application is sending email by using MFMailComposeViewController , everything works just fine. However after
Application use NHibernate. I Have object A that contains set of objects B. I
My application was running fine until i added the following code to add an

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.