What is the right way for Xamarin Forms Button Clicked in C#?

Morning Guys, when using Xaml i can make a button and give it the Clicked="SubmitButton_Clicked" method but I am trying to make a app using C# instead. does anybody know how to get this to work in C# as all I can see when i make the button in c# is submitbutton.clicked

Tagged:

Best Answer

Answers

  • jenova1628jenova1628 Member ✭✭

    No this is perfect, working now. i think i just missed the (object sender, EventArgs e)

    Thanks for your help

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭✭

    @jenova1628 said:
    No this is perfect, working now. i think i just missed the (object sender, EventArgs e)

    Thanks for your help

    Actually when you double click on the event handler in XAML it will create the blank event handler in the code. You don't have to write it manually, if you don't want to.

    VS has evolved so much over years that I have become very lazy in coding and don't bother about remembering syntax that much. :)

Sign In or Register to comment.