Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How to display a pop-up message?

$
0
0

Hi there
To display a pop-up message, I use the following how-to document:

http://developer.xamarin.com/guides/cross-platform/xamarin-forms/working-with/pop-ups/

In particular, it reads
To display these alerts in Xamarin.Forms, use the DisplayAlert method on any Page. The following line of code shows a simple message to the user:
DisplayAlert ("Alert", "You have been alerted", "OK");

This code just aborts the execution. How come?
Even if I try to wrap it with async/await, the result is the same - it aborts the app:

private async void ShowErrorMessage(string errMsg)
{
await DisplayAlert("Alert", errMsg, "OK");
}

How to fix it?
Thanks.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>