I have a view, called a selector, which is essentially two pieces of text, a heading and a link to another page or view. During one of my iterations I noticed that this view could be made into a “view part” and mimicked all around my app for a better overall UI experience.
I now wonder, what would be the best way to change the two values in the View Model to reflect the different parts of the app I want to install this “view part” in. Should it reach into the model, should they be values on the view?
I use MVVM Light in my application and its WP7 if that helps.
Ok I think I found a nice clean way to do this. Have my views models ID property bound to my model as the “active view id”. This property will contain the ID of the View that is open (the view parts reside inside a view at all times), the view part simply reads this value and then pulls up the appropriate data from the model based on it.