dotnet icon indicating copy to clipboard operation
dotnet copied to clipboard

An option for disabling a button with the AsyncRelayCommand while the task is running.

Open ShtibsDev opened this issue 5 years ago • 4 comments

Describe the problem this feature would solve

Users can push the command button many times while the asyn task is already running, causing the task to trriger many times.

Describe the solution

Adding a built in 'OnPropertyChanged()' for the 'IsRunning' property . With a boolean in the constructor (somthing like 'bool disableWhileRunning = false) so the CanExecute property will bi allerted if the execution began or ended.

Describe alternatives you've considered

As of now, lots of self made solution for an AsyncRelayCommand can be found on the web. It would be much easier the official Microsoft package had the opption in it so I won't have to find workarounds.

ShtibsDev avatar Sep 10 '21 18:09 ShtibsDev

Hello, 'ShtibsDev! Thanks for submitting a new feature request. I've automatically added a vote 👍 reaction to help get things started. Other community members can vote to help us prioritize this feature in the future!

ghost avatar Sep 10 '21 18:09 ghost

FYI @Sergio0694

michael-hawker avatar Sep 10 '21 21:09 michael-hawker

This is already on my todo list for a future update, it's definitely one of the things that I plan to look into 🙂 We're just temporarily paused with work until after 7.1 is done and the .NET Community Toolkit is started, but we'll get to it!

Sergio0694 avatar Sep 10 '21 23:09 Sergio0694

Ok thanks for the update!

ShtibsDev avatar Sep 13 '21 10:09 ShtibsDev