I am using Xamarin.forms, Some times user will click twice on same button, I am search away to avoid open same page twice, maybe disable the button after first click will work fine, but i am searching away to avoid open same page if page already exist on Navigation stack.
btnCustomerPage.Clicked += (object sender, EventArgs e) => 
{
 //CustomerPage already Exist on Navigation Stack,So user already open it.
 Navigation.PushAsync(new CustomerPage(); 
};
                if (Navigation.NavigationStack.Count == 0 ||
    Navigation.NavigationStack.Last().GetType() != typeof(CustomerPage))
{
    await Navigation.PushAsync(new CustomerPage(), true);
}
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With