public static UIComponent Center(this UIComponent component)
 {
     return(component.AddConstraint(new UICenterConstraint()));
 }
 public static UIComponent Width(this UIComponent component, int pixels)
 {
     return(component.AddConstraint(new UIWidthConstraint(pixels)));
 }
 public static UIComponent Bottom(this UIComponent component, int pixels)
 {
     return(component.AddConstraint(new UIPositionConstraint(bottom: pixels)));
 }
 public static UIComponent Left(this UIComponent component, int pixels)
 {
     return(component.AddConstraint(new UIPositionConstraint(left: pixels)));
 }
 public static UIComponent Height(this UIComponent component, int pixels)
 {
     return(component.AddConstraint(new UIHeightConstraint(pixels)));
 }
 public static UIComponent Height(this UIComponent component, float percent)
 {
     return(component.AddConstraint(new UIHeightConstraint(percent)));
 }
 public static UIComponent Width(this UIComponent component, float percent)
 {
     return(component.AddConstraint(new UIWidthConstraint(percent)));
 }
 public static UIComponent Color(this UIComponent component, Color?color)
 {
     return(component.AddConstraint(new UIColorConstraint(color ?? Microsoft.Xna.Framework.Color.Black)));
 }
 public static UIComponent Background(this UIComponent component, Color?color)
 {
     return(component.AddConstraint(new UIBackgroundConstraint(color ?? Microsoft.Xna.Framework.Color.Transparent)));
 }
 public static UIComponent FontSize(this UIComponent component, float fontScale)
 {
     return(component.AddConstraint(new UIFontSizeConstraint(fontScale)));
 }
 /**
  * Define the aspect ratio as a float. Ex: 16:9 ~= 1.78f
  */
 public static UIComponent AspectRatio(this UIComponent component, float ratio)
 {
     return(component.AddConstraint(new UIAspectRatioConstraint(ratio)));
 }