开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜