Home > Backend Development > C#.Net Tutorial > C# uses Xamarin to develop applications -- Alert Box

C# uses Xamarin to develop applications -- Alert Box

黄舟
Release: 2017-03-01 10:36:57
Original
1433 people have browsed it


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();
		}
	}
Copy after login

Huancuan敕镞讹综合

if(txtPwd.Text != txtCfmPwd.Text){
					this.ShowAlert("Password and confirmed password not match");
				}
Copy after login

The above is the content of C# using Xamarin to develop applications-Alert Box, more For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template