c#wpf触发调度员 [英] c# wpf firing dispatcherTimer
问题描述
Hello
我正在研究wpf应用程序,我需要在UI上显示正确的时间,所以我的想法是创建单独的线程,我的DateAndTime类将在其中运行,因为我的主线太忙了我读了DispatcherTimer,但我不能让它在
单独的线程上工作,它只是第一次触发然后停止。我在stackoverflow等上搜索了很多,但是找不到工作示例。
I am working on wpf application where I need to show correct time on UI,so my idea was to create separate thread where my DateAndTime class will be running, because my main thread is too busy. I read about DispatcherTimer but i just cant get it working on separate thread, it fires only first time and then stops. I searched alot on stackoverflow etc. but cant find working example.
有人可以在wpf应用程序中编写关于计时器如何在单独的线程上工作的示例(非常简单)。
Can someone write example(very simple) on how timer would work on separate thread,in wpf application.
谢谢
推荐答案
没有任何代码可以查看它是不可能的。
Without any code to look at it is impossible to help.
这篇关于c#wpf触发调度员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!