views:

142

answers:

3

I have a Textbox on my WP7 GUI, which I would like to Bind to a generic list stored in IsolatedStorage. The aim would be, to supply a feature like the AutoCompleteBox in WPF, which seems to be missing in WP7 Silverlight. I want to provide suggestions based on the entries in the favorites list as the user types in text. Matching would be basic match on string.beginsWith(string foo).

Any suggestion on how I could accomplish this?

EDIT: Tried Matthieus suggestion, but no luck. Downloaded the library and added all necessary references. Then tried scenario no. 5 mentioned on nikhilk.net. Both TextBox as well as XTextBox give me an error when I try to add either or . Both say:

The type (TextBox | XTextBox) does not support direct content.

So no luck on that front... other suggestions?

A: 

I would give a look to Silvelright FX Autocomplete Textbox ( http://www.nikhilk.net/Silverlight-AutoComplete.aspx ), it's for Silverlight Desktop but it has more chance to be compatible with WP7 than a WPF one.

Matthieu
Thank you. I will check it out, once i'm at the office and let you know.
froeschli
See EDIT above. No luck with your solution.
froeschli
+1  A: 

Have you tried using the Silverlight 3 SDK's AutoCompleteBox? You can alter the styles to suit your application but the AutoCompleteTextBox works well for Windows Phone 7. This forum post could be a starting point if you wanted to implement your own autocomplete textbox.

indyfromoz
How would I go about adding SL3s AutoCompleteBox? I searched for it using the Object Browser in Visual Studio, but was not able to find and reference it... ?
froeschli
Nevermind my previous comment. Managed to add and use the AutoCompleteBox from Silverlight 3.Thanks for your assistance!
froeschli
+1  A: 

Here is another AutoCompleteBox with source code by Roger Gullhaug:

http://rgullhaug.wordpress.com/2010/09/08/autocompletebox-in-wp7/

I hope that this will answer your question.

FluentComponents
Thank you very much! Seems indyfromoz, who gave the first accepted answer, also helped Roger Gullhaug with this problem. I will have a look at the example from the Blog. Seems I can finaly get this bloody AutoCompleteBox styled WP7 style!!! Yay!
froeschli