Search code examples
.netwpfmultithreadingimagebrush

Is ImageBrush able to work multithreaded?


I am working on WPF with images. When calling an Image control to set the imageSource it is needed to use the dispatcher if image comes from different thread instead of the GUI thread.

I just wonder if I can set an ImageBrush instead to work multithreaded.

Regards


Solution

  • If you call Freeze() on the ImageBrush, you can use it in multiple threads. You can only access the Image Control in the main thread though.