我正在学习xaml中的数据绑定,这个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”,这是我唯一的命名空间。
由于
答案 0 :(得分:0)
如果Ping
是您正在使用的唯一命名空间,则应删除对WPFDemo
的引用