How to select item by typing a keyboard letter key in WPF combobox?
问题 I have a WPF ComboBox and I want to go to items that start with (for example) "e" in the ComboBox when I type that letter. How? My XAML code: <ComboBox ItemsSource="{Binding Roles}" SelectedValuePath="Id" ItemTemplate="{StaticResource ComboBoxDisplayName}" SelectedItem="{Binding SelectedRole}" Width="150"/> 回答1: EDIT: I'm guessing you have an ItemTemplate that looks a little like this: <StackPanel> <TextBlock Text="{Binding Path=Foo}" /> <TextBlock Text="{Binding Path=Bar}" /> </StackPanel>