我希望显示警告的应用程序页面是首次加载页面的时间。该页面正在使用StackLayout
控件和页面上的几个按钮。
DisplayAlert("Question?", "Heave you entered your information before", "Yes", "No");
这就是我现在所拥有的,但它没有显示。我是否需要将它包含在布局中的儿童或其他内容中,谢谢你。
答案 0 :(得分:0)
如果您想在页面加载时显示它,请将其放在OnAppearing
方法
protected async override void OnAppearing ()
{
base.OnAppearing ();
// any other initialization code goes here
await DisplayAlert("Question?", "Have you entered your information before?", "Yes", "No");
}