【发布时间】:2017-04-09 15:01:11
【问题描述】:
我正在开发一个在 Visual Studio 2017 上使用“.Net Framework 4.6.2”的 WPF 项目。
我从 Internet 上获得了一个名为“GrayscaleEffect”的 dll 文件并将其添加到引用中。
在我添加的 xaml 文件中
xmlns:grayScaleEffect="clr-namespace:GrayscaleEffect;assembly=GrayscaleEffect"
并像这样使用它:
<Image.Effect>
<grayScaleEffect:GrayscaleEffect x:Name="grayscaleEffect"/>
</Image.Effect>
当我运行应用程序时它可以工作,但在 xaml 编辑器中它会给出错误:
The name "GrayscaleEffect" does not exist in the namespace "clr-namespace:GrayscaleEffect;assembly=GrayscaleEffect"....
我尝试重建项目并重新启动 Visual Studio,但没有解决这个问题。
【问题讨论】:
-
stackoverflow.com/questions/15051121/…。如果您仍然无法摆脱错误,您可能需要禁用设计器:blog.spinthemoose.com/2013/03/24/…
标签: wpf