Open Opachl opened 6 years ago
Hi, I can confirm above issue. I face the same problem when i'm trying to set command on EditText's event.
id = FindViewById<EditText>(Resource.Id.edit_id);
id.SetCommand("FocusChange", Vm.IdCommand);
Temporary workaround is:
id.FocusChange += (a, b) => {
if (Vm.IdCommand.CanExecute(b))
Vm.IdCommand.Execute(b);
};
isn't this exact situation described in the documentation here?: http://www.mvvmlight.net/doc/xam1.cshtml
Platform: Android Version: GalaSoft.MvvmLight.Platform, Version=5.4.1.0
Pseudo-Code for Bug Description
Query = root.FindViewById<SearchView>(Resource.Id.search);
Query.SetCommand<QueryTextSubmitEventArgs>("QueryTextSubmit", ViewModel.TestCMD);
This throws always System.InvalidCastException: Specified cast is not valid.
I also tried other overloads and combinations result is Always the same