Answer the question
In order to leave comments, you need to log in
How do I fix errors that occur after adding a new Windows Phone 8.1 XAML page?
I add a new XAML page with a right click on the application in the project tree - then click add, then create element and select an empty XAML page. I call let's say HomePage.xaml. The compiler then throws the following errors:
Error CS1061 'App' does not contain a definition for 'InitializeComponent' and could not find an extension method 'InitializeComponent' that takes type 'App' as the first argument (perhaps missing a using directive or an assembly reference).
Error CS1061 'HomePage' does not contain definition for 'InitializeComponent' and could not find an extension method 'InitializeComponent' that takes the type 'HomePage' as the first argument (maybe a using directive or an assembly reference is missing).
Error CS1061 'MainPage' does not contain a definition for 'InitializeComponent' and could not find an extension method 'InitializeComponent' that takes type 'MainPage' as its first argument (maybe missing using directive or assembly reference).
Error CS0103 The name 'Login_Button' does not exist in the current context.
Error CS0103 The name 'Login_Input' does not exist in the current context.
Error CS0103 The name 'Password_Input' does not exist in the current context.
private async void Login_Button_Click(object sender, RoutedEventArgs e)
{
Login_Button.IsEnabled = false;
string login = Login_Input.Text;
string password = Password_Input.Password;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question