0

我在 WP7 中为聊天应用程序编写了这个,我需要把它放在项目中

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

                xmlns:Controls="clr-namespace:Chat.Controls">

我得到这个错误

Error   7   Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'Chat.Controls' that is not included in the assembly.    C:\Users\Amin\Documents\Visual Studio 2010\Projects\Chat\Chat\WP7_Chat\Control.xaml 4   36  Chat

需要我添加一个程序集还是什么?

4

1 回答 1

1

这样做xmlns:Controls="clr-namespace:Chat.Controls"意味着您正在使用当前程序集的本地命名空间(与该 XAML 位于同一项目中),但编译器说它不存在。

所以要么你有错误的命名空间,要么你错过了命名空间之后的程序集(比如xmlns:Controls="clr-namespace:Chat.Controls;assembly=Chat.Controls"

于 2012-04-16T14:29:25.927 回答