Skip to content

Why "NotifyCanExecuteChangedFor" didn't fire? #552

Answered by Sergio0694
Phil4121 asked this question in Q&A
Discussion options

You must be logged in to vote

This is by design. [NotifyCanExecuteChangeFor] will notify the command when the annotated property (field) changes. In your case that's not what's happening: you're changing a property inside an object that's assigned to the property. But the value of the property itself is not changing — it's still the same object.

Unrelated: you don't need that IsBusy boilerplate code and additional property within the command, just bind to the IsRunning property of the generated async relay command, that'll do all of that automatically for you 🙂

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Phil4121
Comment options

Answer selected by Sergio0694
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants