An ItemsControl is inconsistent with its items source - WPF Listbox
原来代码这么写的
private ICollection<string> filterList = new List<string>();
public ICollection<string> FilterList
{
get => filterList;
set
{
filterList.Clear();
filterList.Add(string.Empty);
filterList.AddRange(value);
RaisePropertyChanged();
}
}
需要把set里面的逻辑移到外面去,在赋值之前,在外部写处理逻辑。
标签:items,ItemsControl,filterList,source,inconsistent,WPF,its From: https://www.cnblogs.com/chucklu/p/16768783.html