Can''t have comboBox auto select item(that has the starting letter) when a letter is typed....

I have the following code in my .xaml file

<ComboBoxHorizontalAlignment="Left"Margin="3,3,0,0"x:Name="cmbTestList"IsTextSearchEnabled="True"VerticalAlignment="Top"

Width="170"Height="Auto"

SelectedIndex="-1"

ItemsSource="{Binding Source={StaticResource ItemList}}"

ItemTemplate="{StaticResource ItemDetailTemplate}"/>

<ObjectDataProviderx:Key="ItemList"ObjectType="{x:Type src:LookupItemCollection}"/>

<DataTemplatex:Key="ItemDetailTemplate">

<TextBlockText="{Binding Path=Name}"/>

</DataTemplate>

ComboBox works fine, the only problem is that I have to open the comboBox to select an item, my combo box has ton of items in it so it would be really convinient if the box jumped to the item when a letter is typed.

I would really appreciate any help I can get.

Thanks in advance.....

[4744 byte] By [Jo] at [2008-1-8]
# 1

Try setting DisplayMemberPath="Name" instead of specifying a template. With simple bindings like that, the ComboBox can do type search.

Ben

BenCarter-MSFT at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...

Visual Studio Orcas

Site Classified