Extend DependsOnAttribute for commands
See original GitHub issueWhen using an RelayCommand
(e.g. from MvvmLight), where the CanExecute
depends on the value of a property, the DependsOnAttribute
could be extended, so each time the property changes, the RaiseCanExecuteChanged()
method of the command is invoked.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Similar to DependsOnPropertiesAttribute for Methods ...
Hello, What do I need: Attribute like DependsOnPropertiesAttribute for methods, to list the properties the Can-State of command depends on.
Read more >Deploying Extensions
<group>: Here you write the name of the group of extensions that you want your extension to belong to (e.g., <group>Example Group</group>), this...
Read more >What are TestNG Dependent Tests and How to make ...
In this section, we will move our dependency commands over to the XML file. TestNG lets you create dependencies between groups in the...
Read more >Define the order for deploying resources in ARM templates
Describes how to set one Azure resource as dependent on another resource during deployment. The dependencies ensure resources are deployed ...
Read more >How to automatically call the CanExecute method when ...
How to automatically call the CanExecute method when properties change with MVVM Light in Windows and Phone apps. When using commands, usually ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Raising a property change event on the command property itself should have the same effect as triggering the
CommandManager.InvalidateRequerySuggested()
, so that should work already:@tom-englert Good point, somehow I didn’t think about it. Tested and verified that it indeed works like a charm.