I have a view with a large number of ComboBox
controls which can be populated with a Yes/No option.
I use this to enter some data into the database.
At the moment, to bind all of these combobox selected items I have to do this boilerplate code in my ViewModel for every combobox SelectedItem
:
private string _YesNo1;
public string YesNo1
{
get { return _YesNo1; }
set
{
_YesNo1= value;
RaisePropertyChanged("YesNo1");
}
}
With my view I'd need to do this code some 15+ times and bind each one in XAML.
Is there a better way I can do this so I can bind each combobox SelectedItem
separately but avoid this repeated code?