TypeAhead support for an ItemsControl: TextSearch.TextPath
I knew we had this capability, but I had never used it. Unfortunately, the discoverability of the TextSearch class, the provider of a few attachable properties is not high.
This is how I used it:
<ListBox ItemsControl="...some nice business objects..."
IsTextSearchEnabled="True" TextSearch.TextPath="Name" />
As the SDK shows (http://msdn2.microsoft.com/en-us/library/system.windows.controls.textsearch.aspx), you can also use it on UIElement children.
<ComboBox IsEditable="true" TextSearch.TextPath="Name"> <Image Name="Cat" Source="data\cat.png"/> <Image Name="Dog" Source="data\dog.png"/> <Image Name="Fish" Source="data\fish.png"/> </ComboBox>
I hope to ship my app that used this soon…and I’ll point out more about how I used it..