0
저는 WPF를 처음 사용하고 있으며 수정 된 파일에서 이미지를로드하는 데 문제가 있습니다.동적으로 이미지 소스 변경
은 내가
string fileName = "C:\\Users\\..\\myImage.jpg"
BitmapImage tmp = new BitmapImage();
tmp.BeginInit();
tmp.UriSource = new Uri(@fileName, UriKind.Absolute);
tmp.CacheOption = BitmapCacheOption.OnLoad;
tmp.EndInit();
Image1.Source = tmp;
이 처음 작동하지만 내가 myImage.jpg에 덮어 쓰기 기능을 실행은, 어떤 점에서 나는이 전화를 다음과 같은 방식으로로드 이미지 1이라는 이미지 컨트롤을 가지고 다시 Image1을 업데이트 할 것을 기대하는 코드. 그러나 GUI는 변경되지 않습니다. 그것은 cacheoption과 관련이 있습니까? 파일을 덮어 쓸 수 있도록 그 파일이 필요합니다.
google의 첫 번째 링크 : http://stackoverflow.com/questions/1491383/reloading-an-image-in-wpf – Yogee