The name ‘InitializeComponent’ does not exist in the current context. Cannot get any help on net searches [duplicate]

There are two potential causes of this.

  1. The most common is the x:Class doesn’t match up with the MainPage.xaml namespace. Make sure that x:Class in MainPage.xaml has the correct namespace.

  2. The second most common cause of this problem is that the “Build Action” is not set to “Page” for MainPage.xaml!

Leave a Comment