【发布时间】:2014-01-25 20:37:59
【问题描述】:
我有一个值转换器位于我的 WinRT 应用程序使用的共享项目中。也就是说,转换器在另一个项目/装配中,而不是在使用它的项目/装配中。我已将另一个项目的命名空间添加到我的 XAML 中,并且 IDE 没有将其标记为未解析:
<UserControl xmlns:CommonConverters="using:Common_WinStore.Converters">
我还为它添加了一个资源入口:
<UserControl.Resources>
<CommonConverters:DebugBindingConverter x:Key="DebugBindingConverter"/>
</UserControl.Resources>
但是,IDE 编辑器将 CommonConverters:DebugBindingConverter 标记为错误:
The name DebugBindingConverter does not exist in the namespace "using:Common_WinStore.Converters"
真正令人讨厌的是,当我键入 CommonConverters: 时,Intellisense 会在列表中弹出 DebugBindingConverter,我使用它来自动完成资源引用。
为什么 Intellisense 可以找到它,但 IDE 编辑器或编译器却找不到?
【问题讨论】:
-
我每次使用转换器时都会遇到这个问题,尤其是在 WinRT C# 应用程序中,运行应用程序时它是否有效??
标签: c# xaml windows-runtime ivalueconverter