Uploading HTTP progress tracking

后端 未结 7 1403
梦谈多话
梦谈多话 2020-12-13 07:55

I\'ve got WPF application I\'m writing that posts files to one of social networks. Upload itself working just fine, but I\'d like to provide some indication of how far along

7条回答
  •  执念已碎
    2020-12-13 08:25

    At fast guess, you are running this code on UI thread. You need to run upload stuff on new thread. At that point you have 2 options. 1) You run timer on UI thread and update UI. 2) You update UI using Invoke(because you can't access UI from another thread) calls to update UI.

提交回复
热议问题