Why can't Visual Studio find my WPF InitializeComponent method?

前端 未结 14 1353
失恋的感觉
失恋的感觉 2020-12-16 08:49

This is very strange.

I have an XAML file that looks as follows...



        
14条回答
  •  长情又很酷
    2020-12-16 09:38

    I usually get this problem when renaming custom control classes, or, as in your case, changing the name of the class's namespace. If you don't use Visual Studio's refactoring, then you have to manually change the names in both XAML and C# files.

    Refactoring is only good when you just rename the class, for namespace rename, you have to do it manually.

    For InitializeComponent, look in [Project Folder]\obj\Debug\.

提交回复
热议问题