我的应用程序从主线程(UI)线程以外的线程接收来自h/w设备的一些命令。.NET在其他线程的主线程(UI)中执行函数
// start receiver-thread
m_recThread = new Thread(RecThread) { Name = "RS" };
从这个线程我想做的一些行动在UI Theraad。说一个按钮点击!我正在使用
Dispatcher.CurrentDispatcher.Invoke(DispatcherPriority.Normal,
new Action<Vote>(StartThisVote), presidentvote);
但这没有奏效。请让我知道谁可以从后台线程执行主线程(UI)中的命令。
你是什么意思“这没用......” – DHN