C#C
C#3y ago
9 replies
Elio

✅ RelayCommand CanExecute MVVM

Hi, I'm using this nuget
CommunityToolkit.Mvvm.Input
to add my relaycommand.
i've set CanExecute this way =>
AddThickCommand = new RelayCommand(AddThickCommand_Execute, () => CanAddThickness);


My problem there is that canexecute is trigger only when i declare
AddThickCommand
and canexecute is never raised again even if the boolean
CanAddThickness
change.

I'd like to update canexecute each time
CanAddThickness
change to enable or not the button. Any idea why this don't work with this package ?
Was this page helpful?