private AutoLayoutContentView(string name, UIColor color, string font)
 {
     OurConstraints = new AutoLayoutConstraints ();
     base.BackgroundColor = color;
     Font = font;
     Name = name;
 }
Ejemplo n.º 2
0
 private AutoLayoutContentView(string name, AutoLayoutContentView parent, UIColor color, String font, float x = 10, float y = 10, float width = 10, float height = 10)
 {
     Font                 = font;
     OurConstraints       = new AutoLayoutConstraints();
     Parent               = parent;
     base.BackgroundColor = color;
     Name                 = name;
     base.TranslatesAutoresizingMaskIntoConstraints = false;
     if (parent == null)
     {
         base.Frame = new RectangleF(0, 0, (float)UIScreen.MainScreen.Bounds.Width, (float)UIScreen.MainScreen.Bounds.Height);
     }
     else
     {
         base.Frame = new RectangleF(x, y, width, height);                 // Is this still required?
     }
     if (parent != null)
     {
         parent.Add(this);
         Parent.OurConstraints.ViewNames.Add(new NSString(Name));
         Parent.OurConstraints.Views.Add(this);
     }
     // Add to ourself as well.
     OurConstraints.ViewNames.Add(new NSString(Name));
     OurConstraints.Views.Add(this);
 }
Ejemplo n.º 3
0
 private AutoLayoutContentView(string name, UIColor color, string font)
 {
     OurConstraints       = new AutoLayoutConstraints();
     base.BackgroundColor = color;
     Font = font;
     Name = name;
 }
 private AutoLayoutContentView(string name, AutoLayoutContentView parent, UIColor color, String font, float x = 10, float y = 10, float width = 10, float height = 10)
 {
     Font = font;
     OurConstraints = new AutoLayoutConstraints ();
     Parent = parent;
     base.BackgroundColor = color;
     Name = name;
     base.TranslatesAutoresizingMaskIntoConstraints = false;
     if (parent == null) {
         base.Frame = new RectangleF (0, 0, (float)UIScreen.MainScreen.Bounds.Width, (float)UIScreen.MainScreen.Bounds.Height);
     } else {
         base.Frame = new RectangleF (x, y, width, height);// Is this still required?
     }
     if (parent != null) {
         parent.Add (this);
         Parent.OurConstraints.ViewNames.Add (new NSString (Name));
         Parent.OurConstraints.Views.Add (this);
     }
     // Add to ourself as well.
     OurConstraints.ViewNames.Add (new NSString (Name));
     OurConstraints.Views.Add (this);
 }
 public void AddConstraint(string rule, UIView view, AutoLayoutConstraints constraints)
 {
     view.AddConstraints (NSLayoutConstraint.FromVisualFormat (rule, 0, new NSDictionary (), constraints.Dictionary ()));
 }
Ejemplo n.º 6
0
 public void AddConstraint(string rule, UIView view, AutoLayoutConstraints constraints)
 {
     view.AddConstraints(NSLayoutConstraint.FromVisualFormat(rule, 0, new NSDictionary(), constraints.Dictionary()));
 }