1
votes

In a WP7 app im working on, I want the user to choose from a list of predefined values in a listpicker (values is loaded from XML, from a website). However I also want them to be able to choose a custom value instead of the predefined ones. Is this possible in any way?

I've seen this in Android apps, where a combobox would have a value inside of it called "new value" for example, and when pressed it would launch a pop-up with a textbox to write the new value in.

Do you guys have any idea of how to do this in WP7? Perhaps a sample or article.

2

2 Answers

1
votes

Can't you just add your "new value" item into the source list that your binding the ListPicker too, and then check the selected value to see if that item was selected and handle it accordingly?

0
votes

For slightly different behaviour you could consider using an AutoCompleteBox.

As the user starts typing they would be presented with a filtered list of existing options or they could enter their own new option directly, without requiring a separate, additional set of UI elements & associated logic.