Hi,
I just upgraded to the latest version for the SfButton nuget 19.1.0.56, however with this version the "CanExecute" doesn't work as in the prior version.
All buttons with just a "true" or no CanExecute function, are working fine.
However all other buttons do not execute the command even the CanExecute condition is true.
Reverting back to 19.1.0.55 solves the issue for me.
So I'm guessing there is an issue with that in the latest build.
Code snippet below:
Constructor
CalculateCommand = new Command(async () => await CalculateAction(), CalculateCommand_CanExcecute);
Command
public Command CalculateCommand { get; set; }
bool CalculateCommand_CanExcecute()
{
bool canExecute =
Files.Count > 0
&&
ProjectName.Length > 0
;
return canExecute;
}
async Task CalculateAction()
{
// do stuff
}
In the properties I call
CalculateCommand.ChangeCanExecute();