WPF-AutoComplete-TextBox
WPF-AutoComplete-TextBox copied to clipboard
System.NullReferenceException
If the items for the AutoCompleteTextBox are loaded from a database, a System.NullReferenceException is thrown in the GetSuggestions(string filter) method after typing a character into the text box. In the lambda expression, x is null.
Here is the full method: public IEnumerable GetSuggestions(string filter) { return items.Where(x => x.Contains(filter)); }