views:

140

answers:

1

If have a control that acts like a record selector from a database, say, for example, customers.

The control must act in certain ways allowing the user to type the name, the alias or the code of the customer, and the control will select the correct one, or offer a list of possible candidates, and other behaviors.

I have tried to inherit from ComboBox, but there are some ComboBox behaviors that make it difficult or impossible to do what I want, so I'm better starting from scratch, with a TextBox and Button.

The questions are:

  • Do you know some open-source component so I don't have to start from zero?
  • Have you already done something like this and want to share methodologies or tips?
  • Am I good with a TextBox, a Button and a PopUp control?
+1  A: 

Try this control from CodeProject: A Reusable WPF Autocomplete TextBox

It allows you to specify a source list, and a custom filter. In your custom filter you can select to show only those records that have a name, alias or code that fit the text entered, and the user will have a list of filtered options displayed to them.

Aviad P.
great! And you are the author!
Eduardo Molteni
Your code was a great help in some areas. Thanks!
Eduardo Molteni