wpf程序报"The name 'InitializeComponent' does not exist in the current context"的
2013-06-28 16:20
691 查看
stackOverFlow 's answer
I've encountered this a couple times and keep forgetting what causes it. I ran into this when I renamed the namespace on my code behind file but not in my XAML.
So check if you've done the same. They need to match since they are both part of a partial class
I've encountered this a couple times and keep forgetting what causes it. I ran into this when I renamed the namespace on my code behind file but not in my XAML.
So check if you've done the same. They need to match since they are both part of a partial class
namespace ZZZ {/// <summary>/// Interaction logic for MainWindow.xaml/// </summary>publicpartialclassMainWindow{//...}}<!-- XAML --><Window x:Class="ZZZ.MainWindow">
相关文章推荐
- 关于编写WPF UserControl时提示The name 'InitializeComponent' does not exist in the current contextr的解决!
- MVC:The name 'Scripts' does not exist in the current context
- The name 'Profile' does not exist in the current context
- The name 'xxx' does not exist in the current context 錯誤解決方法之一
- The name 'Profile' does not exist in the current context
- 解决办法:The name 'Response' does not exist in the current context
- Error:The name 'Encoding' does not exist in the current context 解决方法
- HttpUtility does not exist in the current context
- The name 'Scripts' does not exist in the current context error in MVC
- 如何解决 The name ControlID does not exist in the current context 错误!
- InitializeComponent does not exist in the current context
- error CS0103: The name `UnityEditor' does not exist in the current context
- Unity 错误(1)——The name `xxx' does not exist in the current context
- The name does not exist in the current context
- The name ‘InitialzeComponent’ does not exist in the current context
- CS0103: The name ‘Scripts’ does not exist in the current context解决方法
- (XAML)"XXXX" does not exist in the namespace "clr-
- jbpm5.4手动配置——尤其解决“ant install.jBPM-eclipse.into.eclipse”does not exist in the project "lBPM.install"
- About Derby "ERROR 42X51: The class '***' does not exist or is inaccessible. This can hap pen if the class is not public."
- 关于The target "GetCopyToOutputDirectoryContentProjectItems" does not exist in the project.的解决方法