wpf程序报"The name 'InitializeComponent' does not exist in the current context"的

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

namespace ZZZ
{/// <summary>/// Interaction logic for MainWindow.xaml/// </summary>publicpartialclassMainWindow{//...}}<!-- XAML --><Window x:Class="ZZZ.MainWindow">

posted on 2013-06-28 16:20  齐文宣  阅读(809)  评论(0编辑  收藏  举报

导航