WPF Auto search combobox item -


In WPF, when I type some text in combobox, it will start with the text that I entered Will uncover. This highlighting searches the whole text which I have entered in the combo box. But instead I want Text Search to match only the first letter. How to do this

Sample code to recreate the problem:

XAML:

  & lt; Window x: orbit = "combottest window 1" xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns: x = "http://schemas.microsoft.com/winfx/2006/ Xaml "title =" window 1 "height =" 300 "width =" 300 "& gt; & Lt; StackPanel & gt; & Lt; Combo box x: name = "cb" & gt; & Lt; / Combo box & gt; & Lt; / StackPanel & gt; & Lt; / Window & gt;  

Code behind:

  namespace commandout {public partial squares window 1: window {public window 1 () {initial group (); Cb.Items.Add ("A"); Cb.Items.Add ("ab"); Cb.Items.Add ("abc"); Cb.Items.Add ("agsf"); Cb.Items.Add ("B1"); Cb.Items.Add ("B2"); Cb.Items.Add ("B3"); Cb.Items.Add ("B4"); Cb.Items.Add ("bbb"); Cb.Items.Add ("bbbbb"); Cb.Items.Add ("C4"); Cb.Items.Add ("C"); Cb.Items.Add ("c1"); Cb.Items.Add ("c2"); Cb.Items.Add ("CBB"); Cb.Items.Add ("CBD"); Cb.Items.Add ("D"); Cb.Items.Add ("D"); Cb.Items.Add ("df"); }}}  

Now, run the solution, click on Cambodia to open a pop up and press continuously, it will be a circle through all the items starting with one. When we press 'B' continuously, I want similar behaviors.

is an excellent article by Ioan Lazarciuc, which you can use to automate the combo box Can be used.

In your special case, you will need to change the Private Zero Suggestion () method.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -