Forum Cross Platform with Xamarin

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?


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

    This is how I do it.

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