The following example uses an MVVM approach to update a property based on a picker selection:
It uses OnPropertyChanged("SelectedColor"); when the selection changes to update another property.
I have two questions:
Firstly, is there any advantage of using this approach over the normal OnSelectedIndexChanged event in the xaml.cs?
Secondly how would i use this approach if i wanted to update a particular item for my custom object in my viewmodel. For example, if the selected item changed in the above example, store the value in another object in the view model?
It just seems long winded to the OnSelectedIndexChanged approach, but guessing there are advantages i'm unaware of?
basicaly i have a number of dropdowns on a page, and with each change, i want to update the object in my view model which will be sent back to the server with a rest service.