title: Xamarin Android EditText.KeyPress vs EditText.TextChanged events
body: <p>I have the following two event handlers for an EditText field, the first one works but the second one did not. I will rather have the second one working because the first event handler requires that the user press the enter key which I suspect not every one will do.</p>
  
  <p>First and working</p>
  
  <pre><code>private decimal paidAmount;
  private EditText EditTextPaidAmount;
  
   EditTextPaidAmount = RootView.FindViewById&lt;EditText&gt;(Resource.Id.editTextAmountPaid);
              EditTextPaidAmount.KeyPress += (object sender, View.KeyEventArgs e) =&gt;
              {
                  e.Handled = false;
                  if (e.Event.Action == KeyEventActions.Down &amp;&amp; e.KeyCode == Keycode.Enter)
                  {
                      paidAmount = Decimal.Parse(EditTextPaidAmount.Text);
                      RenderInvoiceTotals();
                      e.Handled = true;
                  }
              };
  </code></pre>
  
  <p>This here is not working, it throws a System.FormatException "Invalid character at position 0"</p>
  
  <pre><code>   EditTextPaidAmount = RootView.FindViewById&lt;EditText&gt;(Resource.Id.editTextAmountPaid);
              EditTextPaidAmount.TextChanged += (object sender, Android.Text.TextChangedEventArgs e) =&gt;
              {
                      paidAmount = Decimal.Parse(EditTextPaidAmount.Text, CultureInfo.InvariantCulture);
                      RenderInvoiceTotals();
              };
  </code></pre>