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(); } }
Huancuan敤镞讹精品
if(txtPwd.Text != txtCfmPwd.Text){ this.ShowAlert("Password and confirmed password not match"); }
Das Obige ist C#, das Xamarin zum Entwickeln von Anwendungen verwendet – Warnmeldung Weitere verwandte Inhalte finden Sie auf der chinesischen PHP-Website (www.php.cn)!