public void FetchPicture() { if (_customer.Maybe(_ => _.PhotoURI) == null) return; var service = new CustomerService(new ApiConfiguration(), null, _keyService); service.GetPhotoAsync(_companyFile, _customer.UID, Credentials) .ContinueWith(t => { using (var stream = new MemoryStream(t.Result)) { var bi = new BitmapImage(); bi.SetSource(stream); Picture = bi; } }, TaskScheduler.FromCurrentSynchronizationContext()); }