I have a requirement in my wp7 application that I have to do partial match searching (multiple fields say firstname and lastname) on a list collection (say contact list) on every keypress on search text box and bind to listbox. I have written linq query to get the result on texchanged event. I am getting the result as expected, however it is not quick in response if I have more than 500 items in the collection.
I have posted the code below, I really appreciate if someone can help me out in tunning the performance issue.
private void TechChanged(object sender, TextChangedEventArgs e)
{
IList<Contacts> results = searchcontList
.Where(tb => tb.SearchText.Contains(textsearch.Text))
.ToList();
//"SearchText" is an attribute in contacts class which is concatination values of all the fields in contacts class
listcontact.ItemsSource = results;
}