views:

3887

answers:

3

I've searched around for a while today, but I haven't been able to come up with an AutoComplete TextBox code sample for Silverlight 2 Beta 2. The most promising reference was found on nikhilk.net but the online demo doesn't currently render and after downloading a getting the code to compile with Beta 2, I couldn't get the Silverlight plugin it to render either. I think it is fair to say it is a compatibility issue, but I'm not sure. Does anyone have any alternate sample code or implementation suggestions?

+1  A: 

Take a look at the combobox(very close to a autocomplete text box) at worksight's blog Silverlight ComboBox

Aaron Fischer
Good idea. Funny actually. I started with ComboBox and quickly realized it wasn't going to work so I thought I'd fall back to an autocomplete textbox solution if it was available.
Ben Griswold
+2  A: 

You may want to take a look at my blog: http://weblogs.manas.com.ar/ary/2008/09/26/autocomplete-in-silverlight/

You simply write in your XAML:

manas:Autocomplete.Suggest="DoSuggest"

and then in the class file, you need to implement that method, which report suggestions to a delegate. The options can be hardcoded, requested to a web service, or whaterver.

asterite
+1  A: 

There is also another good example here:

http://silvermail.com.au

This is a Silverlight based mail client that looks a little like Outlook. When I go to send mail and start typing in the "To" text box, an auto-complete pops up and populates the control for me based on values in a list... I think it automatically stores the addresses in isolated storage, but that's just a guess.

This is a really handy tool for checking mail while away from my home PC... at work for example... and it is loaded with impressive Silverlight functionality.

S.

Simon