c# - 无法导入 System.Windows.Controls

标签 c# .net visual-studio import visual-studio-2012

我正在尝试使用 System.Windows.Controls.TextChangedEventArgs,但我无法导入 System.Windows.Controls。当我尝试添加引用时,System.Windows.Controls 不是我可以选择的程序集之一。

有谁知道如何解决这个问题?

最佳答案

接受的答案会告诉您问题所在,但不会告诉您如何解决它。我只是为以后的访问者添加这个。 要解决此问题,您需要添加对PresentationFramework.dll 的引用。

1 转到 Solutions Explorer(它在您的 IDE 右侧)> 右键单击​​ References

enter image description here

2 选择添加引用

在打开的窗口中,查找Presentation Framework,选中复选框并单击确定。就这样。这是向您的项目添加引用的方法。

enter image description here

关于c# - 无法导入 System.Windows.Controls,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14835507/

相关文章:

c# - 使用 TypeWriter 有条件地发出方法

c# - 在 highcharts 中的图表 Canvas 外部显示图表图例

.NET 图表控件 - X 轴文本旋转

.NET CLR 规范

c# - 区分子类和父类对象?

.net - 为什么我会收到此错误 : "Domain operations cannot be started at design time?"

c# - GZip 或 Deflate 用于 HTTP 压缩

c# - id 的当前上下文不存在

mysql - 备份问题

visual-studio - 引用、模板和 NuGet 包之间的区别?