All you have to do is implement INotifyPropertyChanged
on your view model. Raise the PropertyChanged
event inside the setter for "BindingList", and the view will update itself.
public class MySetsViewModel : INotifyPropertyChanged
{
public List<Sets> BindingList
{
get { return _bindingList; }
set
{
_bindingList = value;
RaisePropertyChanged("BindingList");
}
}
private List<Sets> _bindingList;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void RaisePropertyChanged(string propertyName)
{
var handler = PropertyChanged;
if (handler != null)
handler(this, new PropertyChangedEventArgs(propertyName));
}
}