XAML bind BitmapImage ViewModel property
If you're creating the BitmapImage
on any thread other than the UI thread, that would explain this issue. You can freeze the BitmapImage
to ensure it is accessible from any thread:
var bitmapImage = new BitmapImage(...);bitmapImage.Freeze();