2 ms·
much much better to use DelegateCommand: SubmitCommand = new DelegateCommand(()=> DoSomething(), ()=> IsSubmitEnabled); Edit: and obviously the Command De
by tigershark 10y ago
much much better to use DelegateCommand:
SubmitCommand = new DelegateCommand(()=> DoSomething(), ()=> IsSubmitEnabled);
Edit: and obviously the Command DependencyProperty on the Button will be bound to the SubmitCommand property, instead of accessing directly the button from the ViewModel, that is the worst possible thing that you can possibly do.