Hi,
would be interesting in where you get the data from. Database, XML, ...?
However, you can do great search with LINQ.
Example with XML File (could be easily adapted for your goal, important is
StartsWith)
:
var xElem = XElement.Load(@"c:\\adressbook.xml");
var name = from names in xElem.Descendants("contact")
where names.Element("name").Value.StartsWith("A", StringComparison.CurrentCultureIgnoreCase)
orderby names.Element("name").Value
select names.Element("name").Value;
var matches = Enumerable.Distinct(name);
datacontext = matches;
ListBox_adressbook.ItemsSource = matches;
Regards