If you renamed a window, make sure that it also affected the code behind the file, as you can see in the xaml designer code. Compare the class name and window name in all places. I had the same problem, and I noticed that when I renamed the window, the associated code behind the class name was not updated automatically. So I did it manually, and everything went well. Hope this helps :)
source
share