Я схожу с ума по этому поводу.Может ли кто-нибудь заметить ошибку в моем коде после этого комментария, поскольку он дает мне ошибку NullReferenceException в выделенной точке .... Заранее спасибо за любые предложения ...
//retreive the picture from isolated storage
Stream file = PicturesLoader.LoadFileFromStorage(PhoneApplicationService.Current.State[PictureCrop.PictureStateKey_Url].ToString());
BitmapImage bi = new BitmapImage();
bi.SetSource(file);
//load _pic
Picture _pic = new Picture();
_pic.Name = "TempFile";
_pic.Url = PhoneApplicationService.Current.State[PictureCrop.PictureStateKey_Url].ToString();
_pic.Height = bi.PixelHeight;
_pic.Width = bi.PixelWidth;
_pic.Bitmap = bi;
//save the new cropped image for later use
file.Seek(0, SeekOrigin.Begin);
App._capturedImage.SetSource(file); <------ THROWS ERROR HERE, suggest file = NullReferenceException ???????????????????
//Get rid of the stream....
file.Dispose();