WPF中Image控件的Source属性
摘要:imgBook 是一个Image控件,在后台代码中我想给它指定Source的属性。我先如下方式进行:Uri uri = new Uri(strImagePath, UriKind.RelativeOrAbsolute);imgBook.Source = new BitmapImage(uri);strImagePath是图片的绝对路径。在另一处代码中我想把strImagePath指定的图片删掉,操作如下:if (System.IO.File.Exists(strImagePath)) { System.IO.File.Dele...
阅读全文
posted @ 2013-02-28 12:05