I have made some changes and improvements...

Nov 16, 2012 at 6:10 AM
Edited Nov 17, 2012 at 2:34 AM


First I want to thank the author creates this cool component.

Since I need an auto complete control in my project, I download and use this component.

After play with it a while, I found I have made a lot of changes to this component, mainly make it to be able to use in a Windows Forms application.

Here are some changes and improvements:

  • Support Windows Forms applications. To achieve this, I need to subclass parent Form's WndProc.
  • Instead of loading resources.xaml into Application's Resources dictionary, I load it into a local ResourceDictionary object. I think this is necessary to support Windows Forms app. (You might be surprised how much time I spent to get the UI element tree loaded correctly!) 
  • Bind suggestion items to custom object (instead of String).
  • Publish ItemSelected event, and the selected text in the TextBox can be customized through ItemSelected event. 
  • Auto select first suggestion when user press Tab or Enter key.
  • A new WPF sample project that shows how to fully customize the foreground and background of the items in the popup window. See this figure:
  • A new Windows Forms sample project to show how to use this component in Windows Form. See this figure: 
  • Change project folder structure. I removed 'core' and 'resource' folder. (Sorry about that, but it's easy to change them back.)
  • Upgrade to Visual Studio 2012. Of course VS2010 is also supported.

Maybe there are some improvements I forgot to list here. 

Since I made a lot of changes, I wondered is anyone interested with my revision? If yes, how can I share or contribute?

Nov 17, 2012 at 12:13 AM

Thank you huanlin for your update! I am very interested in your upgrade.

I think you can upload it here via the Source Code tab.


Nov 19, 2012 at 1:33 AM

I checked out the source code via SVN, modify it, then try to commit, but it failed with error message:

Error: Server sent unexpected return value (500 Internal Server Error) in response to Error:  MKACTIVITY request for '/svn/!svn/act/49127892-628a-3943-986c-39e9033682a8'  

It seems a permission issue.

Does that mean I should use "Upload Patch" instead?

Nov 19, 2012 at 3:36 AM
Edited Nov 19, 2012 at 3:46 AM

OK! I just uploaded my patch.

It's here: "SOURE CODE" tab > Patches. ID: 13262

By the way, are you the author?