You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this example, it seems logically redundant to declare the NotifyCanExecute attribute - the purpose of NotifyPropertyChanged is to notify anything that depends directly on the property.
And if there are a lot of commands that depend solely on that property (e.g. disable all other commands while editing a single part of the view), it's unwieldy to add the attribute for every command.
Breaking change?
I'm not sure
Alternatives
Here's the code that prompted me to suggest this change.
Overview
It's not feasible to automatically update the CanExecute status for a command when it's bound to a method.
But when bound to a bool property, CanExecute should automatically update without having to include [NotifyCanExecuteChangedFor] on the property.
API breakdown
No API changes. This is a change in behavior of the existing API.
Usage example
In this example, it seems logically redundant to declare the NotifyCanExecute attribute - the purpose of NotifyPropertyChanged is to notify anything that depends directly on the property.
And if there are a lot of commands that depend solely on that property (e.g. disable all other commands while editing a single part of the view), it's unwieldy to add the attribute for every command.
Breaking change?
I'm not sure
Alternatives
Here's the code that prompted me to suggest this change.
Additional context
No response
Help us help you
No, just wanted to propose this
The text was updated successfully, but these errors were encountered: