Creating a Windows Store project in Visual Studio, an error occurred in MainPage.xaml.cs:
- The name ' initialzecomponent ' does not exist in the current context
There are usually two reasons for this problem:
- The most common is that the x:class in MainPage.xaml is inconsistent with the class name. Make sure that x:class is the correct class and namespace.
- In another case, the MainPage.xaml build action is not set to ' Page '.
Deleting the obj folder recompilation may also resolve the issue.
=============================================
My solution:
Set the MainPage.xaml build action to ' applicationdefinition ' and change back to ' Page '.
Reference: http://stackoverflow.com/questions/17853898/ The-name-initializecomponent-does-not-exist-in-the-current-context-cannot-get
The name ' initialzecomponent ' does not exist in the current context