O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Updating a Phrase List Programmatically

The VCD file for the app contains only a couple of City phrases, which does not make for a very useful weather app.

To remedy the situation, the viewmodel contains a dictionary of WOEIDs keyed by city name, as shown in the following excerpt:

Dictionary<string, string> woeDictionary = new Dictionary<string, string>    {        {"Zurich Switzerland", "784794"},        {"Canberra Australia", "1100968"},        {"Bellevue Washington", "2362031"},        {"London England", "44418"},        {"Prague Czech Republic", "796597"},        {"Bangkok Thailand", "1225448"},        {"Paris France", "615702"},        {"Moscow Russia", "2122265"},        {"Madrid Spain", "766273"},        { ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required