IsAsync
means that the bound property will be accessed from another thread, so make sure that whatever you're creating can then be used in a cross-thread manner. The final step of the binding will always occur on the main thread.
Almost all classes in WPF inherit from DispatcherObject
, which basically 'links' an object to the current thread when it's created. The BitmapSource
in your code is created on another thread and then cannot be used on the main UI thread.
However, BitmapSource
inherits from Freezable
: simply call the Freeze
method on your BitmapSource
before returning, to make it immutable and usable from any thread.