Hi,
I'm using WPF/MVVM and am having a binding issue with a ComboBox - any help appreciated!
Heres my Combo ...
<ComboBox Name="ComboBoxAvailableCriteria" Width="255" ItemsSource="{Binding AvailableCriteria}" DisplayMemberPath="SearchableAttribute.Name" />
And heres my ViewModel ...
private List<SearchCriteria> _availableCriteria;
public List<SearchCriteria> AvailableCriteria
{
get { return _availableCriteria; }
set
{
if (_availableCriteria == value) return;
_availableCriteria = value;
OnPropertyChanged("AvailableCriteria");
}
}
public void RemoveCriteria(SearchCriteria searchCriteria)
{
_availableCriteria.Remove(searchCriteria);
OnPropertyChanged("AvailableCriteria");
}
My issue is that although RemoveCriteria removes the item from the list, it does not update the ComboBox on the View. Can anyone assist?
Thanks,
Andy