Xamarin Android弹出窗口

时间:2015-11-28 12:18:59

标签: android xamarin popup

我使用了developer.xamarin网站的代码,但它不起作用,我想我错过了一些“使用”文件。

var alertButton2 = new Button { Text = "DisplayAlert Yes/No" }; // trigger alert
alertButton2.Clicked += async (sender, e) => {
var answer = await DisplayAlert ("Question?", "Would you like to play a game", "Yes", "No");
Debug.WriteLine("Answer: " + answer); // writes true or false to the console

感谢所有答案。

0 个答案:

没有答案