-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use AsyncCommand canExecuteChangedFactory? #26
Comments
The factory is a specific implementation of the CanExecuteChanged event (not it's logic). The current AsyncCommand class always ties CanExecute to IsExecuting. If you need different logic, you'd need to derive a custom type from AsyncCommandBase. Hope this helps, |
Thanks for the hint. I didn't understand that from the comments. So this means that if a command shall only execute on a certain pre-condition you would expect a new property to be introduced and that bound to the
That seems overly cumbersome and against most examples and books about WPF and the Command parameter. |
It's overly cumbersome and sort of against the idea of even taking delegate arguments if I have to derive a new type to support CanExecuteChanged. Extant conversations and StackOverflow discussions seem to indicate the OnCanExecuteChanged() method used to be public. Why did it change to protected? |
I'm trying to use
pre3
and it seems that I cannot pass a simple function any more as the the second parameter for the AsyncCommand as you have suggested here: #11 (comment)What is the expected way of using the factory in
pre3
release?The text was updated successfully, but these errors were encountered: