标签:
public static class AlertExtension { public static void ShowAlert(this Activity activity ,string msg,string title = "", string btnText = "OK"){ AlertDialog.Builder builder = new AlertDialog.Builder(activity); builder.SetTitle(title); builder.SetMessage(msg); builder.SetCancelable(false); builder.SetPositiveButton(btnText, delegate { // it is alert ,keep it simple , do nothing here }); builder.Show(); } }
if(txtPwd.Text != txtCfmPwd.Text){ this.ShowAlert("Password and confirmed password not match"); }
C# 使用Xamarin 开发应用 -- Alert Box
标签:
原文地址:http://blog.csdn.net/lan_liang/article/details/45114445