public void LoadPhoto(PoiService service) {
LocalPath = service.store.GetLocalUrl(service.Folder, Id);
if (!service.store.HasFile(LocalPath))
service.RequestData(Id, PhotoReceived);
else {
LocalPath = service.store.GetLocalUrl(service.Folder,Id);
BitmapSource bs = new BitmapImage(new Uri(LocalPath, UriKind.RelativeOrAbsolute));
//bs.Freeze();
//var b = service.store.GetBytes("", Id);
//FileStore.LoadPhoto(b, ref bs);
Image = bs;
}
}
}