Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Button Clicked Event not Firing in Simulator

$
0
0

Have just begun taking a look at Xamarin.Forms, which looks great. However I'm struggling with getting a simple button click to work.

No matter whether I wire up the Clicked event in the XAML code for the button or whether I wire it up in the code behind, whenever I click the button in the iPhone simulator on my mac.

e.g. this does not fire:

button.Clicked += (sender, args) => {
Button btn = (Button)sender;
DisplayAlert("Clicked!",
"The button labeled '" + btn.Text + "' has been clicked",
"OK", null);
};
this.layout.Children.Add (button);


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>