wpf 用c#代码给img指定uri this.image.Source = new BitmapImage(new Uri(imgSource, UriKind.Absolute)); this.imgSource = imgSource;