Dependency property not updating

Rated 3.90/5 based on 821 customer reviews

It made sense, therefore, when I needed almost the exact same operations but with four different classes that inherit from the same model to use the same view.

To do this I needed a way to define a “View Mode” of the user control. That much is obvious but that there wasn’t some easy, obvious solution on how to bind a dependency property to a property in the view model.

Regardless, one of the issues I had was I needed to make a user control that could not only be the primary control of a view but I needed it to be a child control of another view.

There are a lot of complex operations that the view model controls in terms of handling states and progress bars.

One of the cool new things you can do is create dependent properties.

It isn’t great that the property that is the dependency (e.g.

set First Name()) must also notify that its dependent property changes.

For example, imagine your UI shows an invoice and your store gives a discount based on the amount purchased. Later, if you change your discount to depend on the shipping state as well, you only update the discount property, not the state property.

Dependent properties should help keep your view models a little cleaner and easier to maintain.

Leave a Reply