【发布时间】:2011-10-31 02:28:57
【问题描述】:
我正在学习 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”,这是我得到的唯一命名空间。
谢谢
【问题讨论】:
-
你确定你的本地命名空间是
Ping? -
@dlev,我很确定我的本地命名空间是“Ping”。但是我的项目名称是别的东西。这会是个问题吗?
标签: wpf namespaces undefined xml-namespaces