【问题标题】:Which assembly do I need for DispatcherTimer? namespace not workingDispatcherTimer 需要哪个程序集?命名空间不起作用
【发布时间】:2013-12-19 09:59:40
【问题描述】:

我在使用 WPF 的项目中遇到问题。我正在尝试使用 DispatchTimer。我在另一个示例中看到了 using DispatcherTimer = Windows.UI.Xaml.DispatcherTimer; 命名空间。

这对我不起作用。我假设我错过了一些程序集,但似乎找不到它可能是哪个程序集。

【问题讨论】:

    标签: c# wpf namespaces


    【解决方案1】:

    您使用的命名空间是 WinRT 而不是 WPF。对于 WPF 使用 System.Windows.Threading.DispatcherTimer,它位于程序集 WindowsBase.dll 中,这是运行 WPF 所必需的。

    【讨论】:

    猜你喜欢
    • 2013-04-01
    • 1970-01-01
    • 2011-02-14
    • 1970-01-01
    • 2011-06-15
    • 2013-01-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多