Skip to content

TypeAhead support for an ItemsControl: TextSearch.TextPath

May 16, 2007

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 (, 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"/>

I hope to ship my app that used this soon…and I’ll point out more about how I used it..


From → WPF

  1. Stan permalink

    Thanks for the tip. I am playing with WPF and I am also trying to build a budget management tool for personal use. I am going to enable this for my combo’s.BTW, love reading you blog!

  2. Michael permalink

    This might make creating an auto-complete combobox easier.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: