由于某种原因,当我仅在ios上从一页导航到另一页时,displayalert不显示。它可以在android上运行。这是简单的代码
//Navigating to other page
Navigation.PushAsync(new page1());
//Page1 Code
public page1()
{
InitializeComponent();
DisplayAlert("Test", "Test Successful", "Ok");
}
最佳答案
尝试如下所示,它将为您服务
Device.BeginInvokeOnMainThread (() =>
{
DisplayAlert("Test", "Test Successful", "Ok");
});
http://developer.xamarin.com/guides/cross-platform/xamarin-forms/working-with/pop-ups/