How to invoke event handler inside an asynchronous callback such that is runs in the calling thread

后端 未结 2 424
夕颜
夕颜 2021-01-24 23:39

I am working on a VS project/solution that is used by different applications. My job is to refactor the project and change it from using xxxAsync method to using BeginInvoke.

2条回答
  •  再見小時候
    2021-01-25 00:07

    try to use this, maybe it can help you.

    Deployment.Current.Dispatcher.BeginInvoke(() =>
            {
               //Do something...
            });
    

提交回复
热议问题