0
I have a Button that triggers a Command whose Action is a Pushasync< Tviewmodel >(). The problem is that if you click the button more than once before opening the new screen, it will open more than one screen. And this happens throughout the MVVM when using Pushasync. I have tried to make use of Baseviewmodel’s Isbusy, to no avail. I don’t know what else to do and I am seriously considering leaving MVVM because of it. If anyone can help me I’d appreciate it.
public async void ActionAdicionar() {
if (IsBusy) return;
else IsBusy = true;
await PushAsync<AdicionarItemViewModel>();
IsBusy = false;
}
tried to put a await in the actionAdd call on the button Event Handler?
– Lucas Miranda