Part of my View has a listbox that lists users. The underlying UserClassificationViewModel has a property that exposes a list of User ViewModels. I want the user to be able to change the listbox between listing users by first name or by last name.
I could have the User view model expose two properties (FirstNameFirstDisplayName or LastNameFirstDisplayName). But how would I dynamically change the binding in the listbox to select the appropriate property depending on the users view preference?I'm not sure if that's the best approach, but I'm open to suggestions...
Can a binding be based on another property value? (What's the best MVVM approach to this?)
Thanks.
J
http://digitalcamel.blogspot.com/