windows phone how to Load images on a page from Google/Bing Images
windows phone how to Load images on a page from Google/Bing Images
I'd like to search a term on Google/Bing Images and load images in a page, so the user don't have to exit from the app to browse the results. There's any way to do that?
Dispatcher.BeginInvoke(() =>
{
...
});
that is
private void ImageResultLoadedCallback(IAsyncResult ar) {
Dispatcher.BeginInvoke(() =>
{
var imageQuery = (DataServiceQuery<Bing.ImageResult>)ar.AsyncState; var enumerableImages = imageQuery.EndExecute(ar); var imagesList = enumerableImages.ToList(); // here you could also choose to simply bind the results list to // a control in your UI. Instead, we will simply iterate over the // results. List<string> imageUrlList = new List<string>(); foreach (var image in imagesList) { // do something with the image, or bind the image imageUrlList.Add(image.DisplayUrl); MessageBox.Show(image.DisplayUrl); }
}); }