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 wor开发者_StackOverflowk multithreaded.
Regards
No, it is not the image but the whole WPF framework that is not thread-safe.
So any manipulation to the GUI has to be from the main thread (Dispatched).
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.
精彩评论