pathImg = "\\\\\\\\\\\\\\\\folderProject\\\\\\\\floder_Picture\\\\\\\\Pic1.JPG";
Uri uri = new Uri(pathImg, UriKind.Absolute);
ImageSource imgSource = new BitmapImage(uri);
imageControl.Source = imgSource;
Tag : Web (ASP.NET), WebService, C#, VS 2010 (.NET 4.x)
Date :
2011-04-21 15:29:48
By :
เคส
View :
1274
Reply :
3
No. 1
Guest
pathImg = @"full path image ex c:\image.jpg";
Uri uri = new Uri(pathImg, UriKind.Absolute); ImageSource imgSource = new BitmapImage(uri);
imageControl.Source = new BitmapImage(uri);//เขียนย่อลงแบบนี้ได้
ผมคาดว่าแค่ full path image ของคุณไม่ถูกต้องครับ ลองแก้ดู
pathImg = @"\\folderProject\floder_Picture\Pic1.JPG";
Uri uri = new Uri(pathImg, UriKind.Absolute);
ImageSource imgSource = new BitmapImage(uri);
imageControl.Source = imgSource;