My products page only shows \'Product Name\' and \'Quantity\', quantity isdisplayed/ binded to the picker.
For test purposes to get this working there is only 2 products
Your ProductModel
class does not inherit from INotifyPropertyChanged
interface, you’ll need to add the interface to your class and implement it, also making sure to raise the INotifyPropertyChanged.PropertyChanged
event in Quantity
setter.
You might want to create a ProductViewModel
at this point, as I’m not sure you want to add INotifyPropertyChanged
to a POCO class like ProductModel
.
Please don't edit your question with a different one, open a new question. Your previous question might have helped someone else facing the same problem of UI not being updated when changing a property of a class that does not inherit from IPropertyChanged
. My previous answer is now irrelevant to the new question, and will never benefit anyone else.
For your new question, your Quantity
is of type int
and your picker items are of type string
, changing Quantity
type to string
should help solving your issue, you can also use SelectedIndex
instead of SelectedItem
if the index of the items are matching.
0
1
2
3
4
5
6