How can I create WPF controls in a background thread?

后端 未结 8 596
终归单人心
终归单人心 2021-01-17 15:49

I have method which create background thread to make some action. In this background thread I create object. But this object while creating in runtime give me an exception :

8条回答
  •  北海茫月
    2021-01-17 16:34

    I solved my problem. I just used e.Result property of RunWorkerCompleted method. I get data in background thread and then use this data when thread completed. Thank every body for useful methods. Special thank to Veer to give a recommendation about e.Result property.

提交回复
热议问题