Basically I am getting this error EventHandler "PressMeButton_Clicked" with correct signature not found in type "login.MainPage" (login)
login is the name of my project and login_Clicked is my clicked event handler
I'm trying to make a simple login page,and on the documentation I've seen various ways of Clicked working but everytime I try to write the method on the xaml.cs file when I compile it keeps giving the error above, if I remove the method it works.
<Button x:Name="PressMeButton"
Text="Press Me!"
Pressed="PressMeButton_Pressed"
Clicked="PressMeButton_Clicked" />
this is the XAML part you can see on Clicked the name I have for the event and
private void PressMeButton_Clicked(object sender, EventArgs e)
{
(sender as Button).Text = "I was just clicked!";
}
So I expect to show me a text saying I was clickd but it does not even compile.
This is an old question, but I ran into a similar issue. There was no good explanation why it would give the error. It would even happen on an empty handler that the IDE generated itself. I tried cleaning the solution, rebuilding, etc.
I found that there were some stuck build tasks going still. They appeared in the bottom bar that normally shows "Ready". For me, the solution was restarting VS. Once it started back up, and build worked fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With