开发者

Silverlight 4 Image Source adding through Uri

开发者 https://www.devze.com 2023-03-07 11:14 出处:网络
I am working on a silverlight applica开发者_开发问答tion and I want add Image source through Code behind

I am working on a silverlight applica开发者_开发问答tion and I want add Image source through Code behind so I am adding image source like this

img.Source = new BitmapImage(new Uri(@"C:\Users\Jitendra\Pictures\2006-09-11 001\Kamlesh\DSC_0261.JPG", UriKind.Absolute));

This will not work.

But look at this into the WPF it's working fine.


Your C drive isn't accessible when you run your application. Try adding the image to your project and use a relative URI.

0

精彩评论

暂无评论...
验证码 换一张
取 消