0
<page>
x:Class="Binding_2.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Binding_2"
xmlns:data="using:Binding_2"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Page.DataContext>
<local:Class1/>
</Page.DataContext>
</page>
,我有一个在namespace Binding_2
“1类”的名字并不在命名空间中存在“使用:Binding_2”
namespace Binding_2
{
class Class1
{
public Class1()
{
}
}
}
但class1
它不工作,并显示错误:
The name "Class1" does not exist in the namespace "using:Binding_2"
你的代码没有问题,你应该能够清理你的项目并重建你的项目。如果它不起作用,请尝试修复你的VS. –