Click here to Skip to main content
16,013,207 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
thanks to all, I mainly want do the following steps:
1. i have created a Wpf project.
2. Making three folder in my project (UI, DAO, DLL)
3. App.xaml+.cs and window.xaml+cs both were putted in UI folder.
4. Change the namespace.UI
5. but when i want to debug error message shows "Error: The name 'InitializeComponent' does not exist in the current context".
6. i can't run window.xaml.

THIS WAS THE PROBLEM. plz help me.
Posted
Updated 8-Jul-11 7:21am
v2

1 solution

When you create a WPF project the App.Xaml + .cs are created by VS. I'm guessing you did something wrong.

Try adding a new WPF project to your solution and see if the App.Xaml is there. If so, you could copy files from your firs WPF project into it and delete the old one.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 6-Jul-11 22:43pm    
Hard to say what was messed up. Please see my solution -- it explains the essence of the WPF application start up. This is very useful to know, too.
--SA
jubayerShamshed 7-Jul-11 6:00am    
thanks to Kevin Marois & all, I mainly do the following steps:
1. i have created a Wpf project.
2. Making three folder in my project (UI, DAO, DLL)
3. App.xaml+.cs and window.xaml+cs both were putted in UI folder.
4. Change the namespace.UI
5. but when i want to debug error message shows "Error: The name 'InitializeComponent' does not exist in the current context"
6. i can't run window.xaml.

THIS WAS THE PROBLEM.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900