如何设置DispatcherTimer的优先级?

问题描述:

我正在C#中使用Silverlight为Windows Phone 7创建应用程序。我发现许多DispatcherTimer(DispatcherPriority)重载的引用,但我不能在我的代码中设置它(例如timer = new DispatcherTimer(DispatcherPriority)告诉我“DispatcherPriority在当前上下文中不存在”)。如何设置DispatcherTimer的优先级?

我认为DispatcherTimer被DispatcherTimer(DispatcherPriority)重载,但是当我在代码中使用它时,我看不到任何对此构造函数的引用。我想尝试将优先级设置为“正常”或“发送”,但似乎无法实现具有优先级的任何DispatcherTimer。有什么建议么?

采用分派器优先级的构造函数仅存在于完整的.NET框架中 - 即WPF。 Silverlight/WP7中的DispatcherTimer不支持priorty。

比较DispatcherTimer中的文档。 NET 4Silverlight

+0

这就是我所怀疑的。感谢你的回答!! – user1030679