private async void bnSearch_Click(object sender, RoutedEventArgs e) { //Use the static method ResolveWeatherCode to get the WOEID code of a city, poi or weather station tbLocation.Text = await LocationResolver.ResolveLocationToWoeid(tbSearch.Text); }