Rank: Administration
Groups: AcademicCoachingSchool, admin, Administration, BookSeller, CatholicSchool, CoachingAdult, CoachingProfessional, CoachingSports, ExtraCurriculumCoaching, IndependentSchool, Moderator, MusicTeacher, PrivateSchool, PublicSchool, SelectiveSchool, tutor Joined: 23/11/2008(UTC) Posts: 523
|
Xamarin forms DisplayAlert not showing
DisplayAlert is a method on a Xamarin.Forms Page. One possible issue is that you are calling DisplayAlert from outside of a page or view. If you call it from other threads, do the following. Please note that it's called on MainPage here.
Code:Device.BeginInvokeOnMainThread(async () =>
{
if (await Application.Current.MainPage.DisplayAlert(Constants.ALERT_TITLE, UIConstants.UnsavedData, UIConstants.TextYes, UIConstants.TextNo))
{
//DoYes
}
else
{
//DoNo
}
});
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.