I Windows Phone 8 응용 프로그램에서 작업 중입니다.이미지 리소스가 null인지 확인하십시오.
string Image = "/MyData/" + myObject.ImageName + "big.png";
BitmapImage bmp = new BitmapImage(new Uri(Image , UriKind.Relative));
MyImage.Source = bmp;
내가 폴더에 이미지가의 MyData /, 내가 <imagename>big.png,<imagename>small.png.
내가 <imagename>big.png
이 위치에 존재하거나하지 않을 경우, 그렇지 않은 경우 확인하려면처럼 이미지의 2 개 세트가 선택 <imagename>small.png.
어떻게 수행하나요?
편집 내가 여기 어떻게 나 자신을 해결했다.
File.Exists("path to file") here path should be `folderName/filenames` and not `/folderName/filenames`
나를 도와 주신 모든 분들께 감사드립니다.
왜 downvote? 이 질문에 뭐가 잘못 되었나요? – user3114009
File.Exists 메소드를 사용해 보셨습니까? –
@ JagathMurali 네, 시도해 보았습니다. 작동하지 않습니다. – user3114009