The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked 0. Related 4. Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled. In the Properties tab I can select its fill color in my case I set it to white, to follow the theme conventions :. Also, I modified its Height and Width properties to be larger, as well as the right margin, since there will be a white border around the control:.
By default, there are no brushes set for the border, as well as the border thickness is set to zero. Set the BorderBrush property to white and define the border a bit thicker a value of 2 or 3 should work just fine, but you can adapt it depending on the circumstances. Now you can actually modify the Popup - the list that is being shown when the user wants to select an item. Same as with the border discussed above, there is no default brush defined for the background color.
I am going to set the background to black and the border to white, so that it fits the theme once again :. Now, you have the base control template defined in a Metro style.
To try it out, go to Visual Studio and create a sample Windows Phone 7 application you can still use Expression Blend 4 for Windows Phone 7 if you like it and insert a ComboBox control on your page. Before you proceed to launch the application, make sure you edit a line in your template:.
Remove the Template property reference. Otherwise, a runtime error will be thrown due to the fact that there is no registered resource named ValidationToolTipTemplate in your application. The edited line should look like this:. Of course you can adjust the width of the popup for your needs, but you see that this kind of customized ComboBox is way more suitable for Metro-compatible UIs. This means that you can fetch a list from the database or some other resource and attach it to the ListPicker control.
This is the simplest example of data binding on a string list:. Most of the time you will need to bind ListPicker control to collections of complex objects. Now we need to define which property will be shown in the list. This assigns a DataTemplate to the ItemTemplate of the list picker.
Here you can find more information about Data Templates. That would be all for this edition, I hope you will the techniques described here useful for your projects. Check out my old article about data binding in WP7 and try to extend it with the ListPicker control. User profiles. Knowledge is power. In reply to runewake2's post on June 26, This is an issue you should raise with the developers of the app. This is just a consumer forum and not a forum dedicated to that app.
How satisfied are you with this reply? Thanks for your feedback, it helps us improve the site.
0コメント