How to run something in the STA thread?

后端 未结 5 1261
礼貌的吻别
礼貌的吻别 2020-11-29 03:17

In my WPF application I do some async communication (with server). In the callback function I end up creating InkPresenter objects from the result from server. This requires

5条回答
  •  有刺的猬
    2020-11-29 03:47

    It should be good enough to call it on the UI thread. Therefore, use a BackgroundWorker and on the RunWorkerAsyncCompleted, you can then do the creation of the inkPresenter.

提交回复
热议问题