void UrlCallback(IAsyncResult result) { Uri fileUri = result as Uri; Deployment.Current.Dispatcher.BeginInvoke(() => { CloudHandler ch = Application.Current.Resources["CloudHandler"] as CloudHandler; fileUri = ch.EndGetFileUri(result); BitmapImage bi = new BitmapImage(); bi.DownloadProgress += new EventHandler <DownloadProgressEventArgs>(bi_DownloadProgress); bi.UriSource = fileUri; currentImage.Source = bi; }); }