Last active
July 29, 2016 11:09
-
-
Save Arpit360/75c84bfdeb71117102f2298ccf2c5747 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO; | |
using UIKit; | |
var window = new UIWindow(UIScreen.MainScreen.Bounds); | |
window.MakeKeyAndVisible(); | |
var controller = new UIViewController(); | |
window.RootViewController = controller; | |
controller.View.BackgroundColor = UIColor.Magenta; | |
var name = new UITextField{ Placeholder = "Enter Name", BorderStyle = UITextBorderStyle.RoundedRect, Frame = new CGRect(10, 80, controller.View.Bounds.Width -20, 31.0f)}; | |
controller.View.AddSubview(name); | |
var email = new UITextField{ Placeholder = "Enter Email", BorderStyle = UITextBorderStyle.RoundedRect, KeyboardType = UIKeyboardType.EmailAddress, Frame = new CGRect(10, 120, controller.View.Bounds.Width -20, 31.0f)}; | |
var password = new UITextField{ Placeholder = "Enter Password", BorderStyle = UITextBorderStyle.RoundedRect, SecureTextEntry = true, Frame = new CGRect(10, 160, controller.View.Bounds.Width - 20, 31.0f)}; | |
var enterButton = UIButton.FromType(UIButtonType.System); | |
enterButton.Frame = new CGRect(10, 200, controller.View.Bounds.Width - 20, 31.0f); | |
enterButton.SetTitle ("Submit", UIControlState.Normal); | |
controller.View.AddSubviews(new UIView[]{email, password, enterButton}); | |
enterButton.TouchUpInside += (object sender, EventArgs e) => | |
{ | |
String strtxt = "Email : " + email.Text + " Name " + name.Text; | |
Console.WriteLine(); | |
lbl.Text = strtxt; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment