旗下导航:搜·么
当前位置:网站首页 > .Net教程 > 正文

C# 运用Xamarin 开辟运用 -- Alert Box【C#.Net教程】,C#,Xamarin ,Alert Box

作者:搜教程发布时间:2019-11-27分类:.Net教程浏览:93评论:0


导读:publicstaticclassAlertExtension{publicstaticvoidShowAlert(thisActivityactiv...
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的内容,更多相关内容请关注ki4网(www.ki4.cn)!

标签:C#XamarinAlert Box


欢迎 发表评论: