I have a search dialog where I want to disable the search button during the search. This is the current code but the button does not get deactivated
View:
I've made an AsyncDelegateCommand
for that reason (based on famous DelegateCommand), it internally disable command (in UI) during executing command action:
public class AsyncDelegateCommand : ICommand
{
readonly Action
xaml:
ViewModel:
AsyncDelegateCommand SomeCommand { get; }
// in constructor
SomeCommand = new AsyncDelegateCommand(o => { Thread.Sleep(5000); }); // code to run