I have a button that is bind to an mvxCommand. After the binding the button is disabled. Before the binding he is enabled.
Anyone who can tell me why this happened?
My View:
public override void ViewDidLoad()
{
Debug.WriteLine("VatButton6 = " + VatButton6.Enabled); // this is true
var set = this.CreateBindingSet<CreatePaymentView, CreatePaymentViewModel>();
set.Bind(AmountTxt).To(vm => vm.Amount);
set.Bind(ReferenceTxt).To(vm => vm.Reference);
set.Bind(VatButton6).To(vm => vm.RegisterVatCommand); //CommandParameter("21%");
set.Apply();
Debug.WriteLine("VatButton = " + VatButton6.Enabled); // this is false;
}
My Command:
public IMvxCommand RegisterVatCommand
{
get { return new MvxCommand(RegisterVat); }
}
public void RegisterVat()
{
// switch (vat)
// {
// case "21%":
// Vat = 21;
// break;
// case "6%":
// Vat = 6;
// break;
// case "0%":
// Vat = 0;
// break;
// case "nvt":
// Vat = -1;
// break;
// default:
// throw new ArgumentException("invalid button title");
// }
}