I have an image control on a Window in my WPF project
XAML:
<Image
Source="{Binding NotifyOnSourceUpdated=True, NotifyOnTargetUpdated=True}"
Binding.SourceUpdated="bgMovie_SourceUpdated"
Binding.TargetUpdated="bgMovie_TargetUpdated" />
In code I am changing the source of the image
C#:
myImage = new BitmapImage();
myImage.BeginInit();
myImage.UriSource = new Uri(path);
myImage.EndInit();
this.bgMovie.Source = myImage;
But the bgMovie_SourceUpdated event is never triggered.
Can anyone shed some light on what I'm doing wrong?