[英]Conflict in namespaces in WPF Xaml
I have created a WPF project that has the name Company.System.SomeName . 我创建了一个名为Company.System.SomeName的WPF项目。 When I try to build the project, I get several conflict errors in the xaml files as the one bellow:
当我尝试构建项目时,我在xaml文件中遇到几个冲突错误,如下所示:
The type or namespace name 'Windows' does not exist in the namespace 'Company.System'.
类型或名称空间名称“ Windows”在名称空间“ Company.System”中不存在。
Is there anyway to solve this conflict or I need to change the project name and exclude the System string from it? 无论如何有解决此冲突的方法,还是我需要更改项目名称并从中排除System字符串?
I appreciate your help. 我感谢您的帮助。
You need to mention global::System in order to use the global namespace to solve the issue. 您需要提及global :: System才能使用全局名称空间解决问题。
example 例
using System;
namespace SampleApp.System{
...
`global::System.Windows.Controls.UserControl`
....
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.