title: Xamarin xml android:onClick callback method
body: <p>This is my XML code:</p>
  
  <pre><code>    &lt;Button
      android:text="Button"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_below="@id/MyButton"
      android:id="@+id/button1"
      android:onClick="sayHellow" /&gt; //RELEVANT PART
  </code></pre>
  
  <p>And this is my main activity:</p>
  
  <pre><code>[Activity(Label = "FFFF", MainLauncher = true, Icon = "@drawable/icon", Theme = "@style/Theme.AppCompat.Light")]
  public class MainActivity : AppCompatActivity
  {
      protected override void OnCreate(Bundle bundle)
      {
          base.OnCreate(bundle);
  
          // Set our view from the "main" layout resource
          SetContentView(Resource.Layout.Main);
      }
      public void sayHellow(View v) //CALLBACK FUNCTION
      {
          Snackbar.Make(v, "My text", Snackbar.LengthLong)
              .Show();
      }
  }
  </code></pre>
  
  <p>Problem is I get a runtime error and the debug window complains that <code>Button</code>could not find "sayHellow" function, but as you can see I declared everything according to the docs.</p>