public override void LoadView()
{
View = new UIView();
View.BackgroundColor = UIColor.LightGray;
RectangleF f = new RectangleF(10,10,300, 44);
UsernameTextField = new UITextField(f) {
Placeholder = "Username",
BorderStyle = UITextBorderStyle.RoundedRect,
AutocapitalizationType = UITextAutocapitalizationType.None,
AutocorrectionType = UITextAutocorrectionType.No
};
View.AddSubview(UsernameTextField);
f.Offset(new PointF(0, f.Height + 10));
PasswordTextField = new UITextField(f) {
Placeholder = "Password",
BorderStyle = UITextBorderStyle.RoundedRect,
SecureTextEntry = true
};
View.AddSubview(PasswordTextField);
f.Offset(new PointF(0, f.Height + 10));
UIButton button = UIButton.FromType(UIButtonType.RoundedRect);
button.SetTitle("Login", UIControlState.Normal);
button.Frame = f;
button.TouchUpInside += LoginHandler;
View.AddSubview(button);
}