Using BitmapImage created on Threadpool thread

前端 未结 1 868
旧时难觅i
旧时难觅i 2021-01-22 02:15

I get an \"invalid cross-thread access\" exception when trying to set an image using a BitmapImage instance created on a ThreadPool thread.

It turns out to avoid this I

1条回答
  •  一整个雨季
    2021-01-22 02:49

    You need to Freeze it after creating it to make accessible for other threads.

    0 讨论(0)
提交回复
热议问题