Interested in InterestedIn

Topics: Questions
Nov 26, 2012 at 7:46 PM

We're building a fairly "traditional" LOB app where properties of a model are displayed in a treeview, a property grid and a worksheet. All three views will have its own viewmodel representing the same model. If one of the properties changes in one of the viewmodels the other viewmodels need to update as well. Should I use the "InterestedIn" attribute for this or are notifications automatically pushed to the other viewmodels through the model? 

Martin

Nov 26, 2012 at 8:13 PM

If they share the same instance of the model, you don't have to do anything.

Nov 27, 2012 at 8:14 PM

Not sure if anybody experienced the same, but in my case an issue in the Avalon Dock 2.0 caused Viewmodels to be recreated (controls are recreated on a layoutGridControl.UpdateChildren event) (http://avalondock.codeplex.com/workitem/15629)

I've upvoted the issue there.