简体   繁体   中英

Conflict in namespaces in WPF Xaml

I have created a WPF project that has the name Company.System.SomeName . When I try to build the project, I get several conflict errors in the xaml files as the one bellow:

The type or namespace name 'Windows' does not exist in the namespace 'Company.System'.

Is there anyway to solve this conflict or I need to change the project name and exclude the System string from it?

I appreciate your help.

You need to mention global::System in order to use the global namespace to solve the issue.

example

using System;

namespace SampleApp.System{

...
`global::System.Windows.Controls.UserControl`
....
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM