How do I load images in the background?

前端 未结 5 1249
小鲜肉
小鲜肉 2021-01-03 09:50

I am trying to load an image in the background and then update the UI. I have been playing with this all day and I don\'t know what I am missing. I keep getting the follow

5条回答
  •  梦谈多话
    2021-01-03 10:04

    You want to incorporate multiple threads in your WPF application. As stated in the article below, WPF forces you to do all UI work on the thread that created the UI.

    Check this out: http://pjbelfield.wordpress.com/2007/10/29/worker-threads-and-the-dispatcher-in-wpf/

    and for intensive UI work:

    http://eprystupa.wordpress.com/2008/07/28/running-wpf-application-with-multiple-ui-threads/

提交回复
热议问题