您好,欢迎访问一九零五行业门户网

C# 使用Xamarin 开发应用 -- Alert Box

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的内容。
其它类似信息

推荐信息