I have an application where I am using an Image control to display a large image (~8000x8000 pixels). I have the image control bound to an ImageSource like this:
<Image x:Name="_ImageSource" Source="{Binding ViewModel.Image, Mode=OneWay}" RenderOptions.BitmapScalingMode="Linear"/>
I'm using the Leadtools image library to create the ImageSource, which is a WritableBitmap.
this.Image = RasterImageConverter.ConvertToSource(displayImage, ConvertToSourceOptions.None) as BitmapSource;
Everything works, but there is a significant delay between the time the Image property is set on the viewmodel and the time the Image control actually updates the display (on the order of 10 seconds for a large image). I've done some profiling/logging and I know it is not the call to RasterImageConverter.ConvertToSource()
, instead it seems to be something that the Image control itself is doing.
So far I have been unable to find out much about what could be causing this delay. At the very least I'd like to be able to get notified when the control actually does update so I can display some kind of busy notification, but there doesn't seem to be any event that fires at the right time.
Any ideas or assistance is appreciated.