TargetInvocationException using DelegateCommand on Xamarin.iOS
Description
There is any approach in order to use DelegateCommand implementation in a cross-platform app?
Basic Information
- Xamarin.Forms version: 2.5.1.444934
- IDE: VS 2017
Thank you in advance,
You provided no information on your issue, or the required reproduction app, so I am closing this issue.
Yes, DelegateCommand should work on any NetStandard compatible project.
what issue are you having? Can you fill out the issue in full with reproduction steps?
I have a Xamarin project with iOS and in my ViewModel I have the following code using DelegateCommand. In Android works fine but in iOS I'm getting an TargetInvocationException. I took a look into the DelegateCommand's code and I saw that uses Reflection.
private DelegateCommand<string> _SideMenuTappedCommand;
public DelegateCommand<string> SideMenuTappedCommand
=> _SideMenuTappedCommand ?? (_SideMenuTappedCommand = new DelegateCommand<string>(ExecuteSideMenuTappedCommand, CanExecuteSideMenuTappedCommand)
.ObservesProperty(() => IsBusy));
I'm only using the commands implementation from prism.
Thanks
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.