title: Maintaining combobox text after selecting a bound item in WPF / C#
body: <p>I have a WPF ComboBox which I'm using to search names. I use the MVVM pattern and it's all pretty simple:</p>
  
  <p>The ComboBox Text property is bound to a "SearchString" property on the VM. The ComboBox ItemsSource is bound to a "SearchResult" property on the VM. This is a list of objects displayed using a DataTemplate. The ComboBox also triggers a "PreviewKeyDown" event and pressing enter selects the first item in the result set, with up and down arrow keys traversing the results. The SelectedItem is bound to the DataContext for a GroupBox. This part works really nicely.</p>
  
  <p>When an item is selected in the ComboBox, WPF is automatically attempting to replace "Text" with my SelectedItem. This causes my results set to get emptied and "Text" to revert to an empty string.</p>
  
  <p>The behaviour I'd <em>like</em> is that when an item is selected, the text in the ComboBox remains exactly the same, so that my user can continue to traverse the result set using up and down arrows.</p>
  
  <p>Is there an elegant way to achieve this? I think that nothing will be added to the question with a code snippet, but happy to supply if wanted.</p>