用代码给Image的Source赋值,该怎么解决
用代码给Image的Source赋值 image1.Source new BitmapImage(new Uri(Images/1.jpg, UriKind.Relative)
用代码给Image的Source赋值
image1.Source = new BitmapImage(new Uri("Images/1.jpg", UriKind.Relative));
这样给一个Image赋一个图片对吗?为什么显示不出来? image
[解决办法]asp.net 用 Image1.ImageUrl
[解决办法]Uri的路径正确么?
wpf下我一般这么写
image1.Source = new BitmapImage(new Uri(System.Environment.CurrentDirectory + @"Images\1.jpg"));