© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
12 replies
.bobgoblin

❔ Setting Up First Xamarin FOrms

trying to follow a xamarin forms tutorial on creating a mobile app...but I am getting these errors
        public LoginPage()
        {
            var vm = new LoginViewModel();
            this.BindingContext = vm;
            vm.DisplayInvalidLoginPrompt += () => DisplayAlert("Error", "Invalid Credentials", "OK");
            
            InitializeComponent(); 

            Email.Completed += (object sender, EventArgs e) =>
            {
                Password.Focus();
            };

            Password.Completed += (object sender, EventArgs e) =>
            {
                vm.SubmitCommand.Execute(null);
            };
        }
        public LoginPage()
        {
            var vm = new LoginViewModel();
            this.BindingContext = vm;
            vm.DisplayInvalidLoginPrompt += () => DisplayAlert("Error", "Invalid Credentials", "OK");
            
            InitializeComponent(); 

            Email.Completed += (object sender, EventArgs e) =>
            {
                Password.Focus();
            };

            Password.Completed += (object sender, EventArgs e) =>
            {
                vm.SubmitCommand.Execute(null);
            };
        }
errors =>
The name InitializeComponent does not exist in the current context
Email does not contain a definition for Completed
The name Password does not exist in the current context
The name InitializeComponent does not exist in the current context
Email does not contain a definition for Completed
The name Password does not exist in the current context
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

(Xamarin.Forms) Setting DataTemplate for view with DataTrigger
C#CC# / help
3y ago
XAMARIN.FORMS BLUETOOTH ISSUE
C#CC# / help
3y ago
Xamarin.Forms UWP Publish issue
C#CC# / help
3y ago
Using Spotify Rest Api Authorization Xamarin Forms
C#CC# / help
3y ago