Await Display Alert, button clicked from user

Hi there.
How do I know that the user pressed the button, "ok", "cancel"? And using this , how can a make a if?

Posts

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭
    If (answer). //yes
  • seanydaseanyda GBMember ✭✭✭✭✭

    This is how I do it.

    bool confirmForm = await DisplayAlert("Title", "Message", "Yes", "No");
                    if(confirmForm) {
                       // YES
                    }
                    else 
                    {
                        // NO
                    }
    
Sign In or Register to comment.