WPF xmlns : The 'clr-namespace' URI refers to a namespace that is not included in the assembly

标签 wpf namespaces undefined xml-namespaces

我正在学习 xaml 中的数据绑定(bind),这个 xmlns 问题阻止了我。我的 cs 代码在命名空间“Ping”中。这是我的 MainWindow.xaml:

<Window x:Class="Ping.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:custom="clr-namespace:WPFDemo;assembly=WPFDemo"
    xmlns:local="clr-namespace:Ping"

最后一行在标题中提示。为什么它不起作用?我正在使用“Ping”,这是我获得的唯一命名空间。

谢谢

最佳答案

Ping是您使用的唯一命名空间,您应该删除对 WPFDemo 的引用

关于WPF xmlns : The 'clr-namespace' URI refers to a namespace that is not included in the assembly,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7130143/

相关文章:

c# - 如何子类化 WPF ComboBox 以添加额外的按钮

c# - 将组合框显示文本设置为 ObservableCollection<T> 的属性

c# - 此命名空间冲突是由于 XAML 到 .NET 代码生成中的错误造成的吗?

javascript - 如果测试[未定义]

javascript - 避免 IE 抛出 : Error: 'console' is undefined 的常见习语

c# - WPF - 隐藏 ItemsControl -> UniformGrid 中的项目基于数据绑定(bind)不占用 UI 空间

python - 为什么setup.py在安装前会清空命名空间的内容?

php - Codeception SOAP 命名空间

java - setArguments(bundle) 未定义

c# - 当前不可见时展开/选择 TreeView 节点