开发者

how to use the wpf dispatcher to create a multi UI thread winforms app

The second answer by Martin in this link explains how the dispatcher can be used in a winforms app. This link explains the wpf side. So my question is - can we do this in a winforms app ? If not, why ? thank you

UPDATE: I have found this link also that shows the multiple app.run method mentioned by Henk below. However it does not use the wpf dispatcher. I wonder if there is a performance diff between using the wpf dispacther in winforms (my q开发者_StackOverflowuestion) vs multiple app.runs


No matter what you do, you will be limited to using 1 thread (the UI thread) to update your windows (Winforms, WPF, native code). You can spawn as many worker threads as you want to do all the data gathering and prep work you need, however you'll still have to use the UI thread to do the updates. Take a look at the Task or the BackgroundWorker classes to do this work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜