Reputation: 2103
I am very new to C# and WPF. I have been developing and application in which I need to use an auto complete text box. For that, I follow the article in this link. http://net-informations.com/q/faq/autocomplete.html
But when I code, Visual Studio gives me the error saying,
'System.Windows.Controls.TextBox' does not contain a definition for 'AutoCompleteSource' and no extension method 'AutoCompleteSource'....
As I think the reason might be, WPF does not contain the definition for Auto Complete textbox. Therefore As I found in a comment for the second answer in this question, I added the WPF toolkit and added the reference to my project(as described here).
But still I don't see the autocomplete text box getting appeared in my tool box and that above mentioned error getting disappeared.
Why is this and how Can I get autocomplete text box into my tool box?
Upvotes: 0
Views: 4753
Reputation: 2965
WPF
doesn't have an in-built AutoComplete
TextBox
. You need to use third-party software, try something like this;
WPF TextBox AutoComplete 1.0.2
or
The article you were following uses WinForms
, which WPF
is the new version of.
Upvotes: 1