Name does not exist in the namespace

我只是一个虾纸丫 提交于 2019-12-03 15:16:04

I figured out what the problem was. It's a glitch in Visual Studio 2015. After you add a namespace in XAML it's best to compile/ test run your program or you will get this problem. To fix it just:

  1. Delete the namespace reference in question and all usages of that reference.
  2. Perform a test run/ compile your program.
  3. Add the namespace reference back into the opening page tag
  4. Perform another test run/ compile your program.
Now when you use your new namespace reference the compiler won't glitch out.

I found that I had unintentionally defined the same object in a sub-namespace. once I got rid of the second definition, this problem disappeared

You have to declare 'local' namespace in section which can be found on the top of ypur Xaml file. You will see many namespace with format xmlns:Name ="value" Add your name space with Name =local and Value as your Namespace

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!