Search This Blog

Wednesday 29 April 2020

How to avoid multiple buttons being clicked at same time in Xamarin.Forms

bool AllowTap = true;
private void Button_Clicked(object sender, EventArgs e)
{
    if (AllowTap)
    {
        AllowTap = false;
        //Write logic here 
 await Task.Delay(1000);
        AllowTap = true;
    }
}

Popular Posts