DispatcherTimer 类的命名空间是什么?
好的!这听起来像是“让我为您 Google 一下”,我确实做到了,这里是 MSDN 链接:
http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatchertimer.aspx
所以在 MSDN 中它说它是 System.Windows.Threading 但我的VS IDE 出现错误。
到底是怎么回事?我希望能够使用 DispatcherTimer 类。
Ok! This sounds like a "Let Me Google That For You", well I did and here is the MSDN link:
http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatchertimer.aspx
so in MSDN it says it is System.Windows.Threading but my VS IDE is giving error on it.
What is going on? I want be able to use DispatcherTimer class.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
MSDN 页面还说:
您引用了该程序集吗?您的项目是 WPF 项目吗? (WindowsBase 是一个 WPF 库。)
The MSDN page also says:
Did you reference this assembly? Is your project even a WPF project? (WindowsBase is a WPF library.)
您需要添加对
WindowsBase.dll
的引用。这是一个 WPF 程序集。You need to add a reference to
WindowsBase.dll
. It's a WPF assembly.您是否添加了对 WindowsBase 程序集的引用?
Have you added a reference to the WindowsBase assembly?
MSDN 页面还说您需要引用 WindowsBase.dll,是吗?
The MSDN page also says you need to reference WindowsBase.dll, did you that?
该文档还指出该类位于 WindowsBase 程序集中,因此您需要对该程序集的引用才能使用它。
The documentation also says that the class is in the WindowsBase assembly, so you need a reference to that assembly to use it.
确保您的项目中引用了 WindowsBase.dll。 (命名空间及其类可以存在于多个程序集中,并且默认情况下项目中仅引用少数程序集。)
Make sure that the WindowsBase.dll is referenced in your project. (Namespaces and their classes can exist in multiple assemblies and only a handful of assemblies are referenced in projects by default.)
或者您可以使用以下内容:
使用 Windows.UI.Xaml;
MSDN 上的文档
or you can use the following:
using Windows.UI.Xaml;
Documentation on MSDN