我对Xamarin完全陌生,所以这可能确实很明显。但是,当我运行带有DisplayAlert调用的Xamarin应用程序时,屏幕消失,但没有对话框出现:
<Button x:Name="PlayButton" Text="Play" HorizontalOptions="CenterAndExpand" HeightRequest="100" WidthRequest="200" FontSize="64" Clicked="PlayButton_ClickedAsync"/>
private async void PlayButton_ClickedAsync(object sender, EventArgs e)
{
await DisplayAlert("Play", "This is where we would start the game.", "OK");
}
如何使此警报实际显示?我正在用UWP应用进行测试,如果有关系,直到Android模拟器完成下载...