views:

21

answers:

1

When one presses a letter (or a sequence of letters) in a windows combobox or in a list, automatically the first item that starts with the given letter, is selected.

Is there a declarative way to do the same thing for a WPF ListBox that has it's items bound by the ItemsSource-property and the ItemsTemplate set to a DataTemplate.

+1  A: 

Put on your listbox:

IsTextSearchEnabled="True"
TextSearch.TextPath="Prop"

where Prop is the path to the property of the bound object you want to use for text searching.

Alex Paven