public override void ViewDidLoad() { base.ViewDidLoad (); var v1 = new UIView (); v1.BackgroundColor = UIColor.Red; this.View.AddSubview (v1); v1.AlignTopAndLeading ("20", "20", v1.Superview); v1.ConstrainWidthAndHeight ("40", "40"); // Perform any additional setup after loading the view, typically from a nib. }