Not Working with Prism DelegateCommand ObservesCanExecute
See original GitHub issueHi Andrei, could you check if it’s only me or u experience this to? In my use case is to prevent the image double clicked.
Example code :
private bool can_click = true;
public bool Can_Click{
get{return can_click;}
set{SetProperty(ref can_click, value);}
}
public DelegateCommand UpdateCommand=> new DelegateCommand(Update).ObservesCanExecute(()=> Can_Click);
private void Update(){
Can_Click = false;
//Do Something
Can_Click = true;
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
`DelegateCommand.ObservesCanExecute()` fails to raise ` ...
It appears that ObservesCanExecute() on DelegateCommand only works if you use a member of the instantiating class. Repro. Consider the following ViewModel :....
Read more >AutoProperties doesn't work with DelegateCommand. ...
ObservesCanExecuteChanged relies on INotifyPropertyChanged of the class containing the observed property. This raises the event in case of a ...
Read more >Commanding
The Prism DelegateCommand class encapsulates two delegates that each reference a method implemented within your ViewModel class. It implements the ICommand ...
Read more >Prism - Using Delegate Commands - YouTube
In this video, I show you how to use the unique features of Prism's DelegateCommand to respond to user interaction from within a...
Read more >AutoProperties doesn't work with DelegateCommand ...
Coding example for the question AutoProperties doesn't work with DelegateCommand.ObservesCanExecute in prism?
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 FreeTop 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
Top GitHub Comments
Sure. Thanks for the time-saver plugin. Newbie here, and I love using this touch effect and cardview in my current project. Keep up the good work 😃
@rredoh no problem) enjoy it. Thanks for feedback P.S. If you like this plugin, you may set “STAR” =)