开发者

Cloning the WPF ComboBox control: Ideas or suggestions

开发者 https://www.devze.com 2022-12-18 20:05 出处:网络
If have a control that acts like a record s开发者_运维问答elector from a database, say, for example, customers.

If have a control that acts like a record s开发者_运维问答elector 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号