private static object ConvertToInstanceDescriptor(SimplePropertyConstraint simplePropertyConstraint) { if (simplePropertyConstraint.Control == null && simplePropertyConstraint.Property == ConstraintProperty.None) { var constructorInfo = GetConstructorInfo(typeof(int)); return(new InstanceDescriptor(constructorInfo, new object[] { simplePropertyConstraint.Constant })); } else { var constructorInfo = GetConstructorInfo(typeof(Control), typeof(ConstraintProperty), typeof(int)); return(new InstanceDescriptor(constructorInfo, new object[] { simplePropertyConstraint.Control, simplePropertyConstraint.Property, simplePropertyConstraint.Constant })); } }
public void SetBottom(Control child, SimplePropertyConstraint propertyConstraint) { GetElement(child).Bottom = propertyConstraint; PerformLayout(this, "BottomConstraint"); }
public void SetRight(Control child, SimplePropertyConstraint propertyConstraint) { GetElement(child).Right = propertyConstraint; PerformLayout(this, "RightConstraint"); }
public void SetMiddle(Control child, SimplePropertyConstraint propertyConstraint) { GetElement(child).Middle = propertyConstraint; PerformLayout(this, "MiddleConstraint"); }
public void SetCenter(Control child, SimplePropertyConstraint propertyConstraint) { GetElement(child).Center = propertyConstraint; PerformLayout(this, "CenterConstraint"); }
public void SetTop(Control child, SimplePropertyConstraint propertyConstraint) { GetElement(child).Top = propertyConstraint; PerformLayout(this, "TopConstraint"); }
public void SetWidth(Control child, SimplePropertyConstraint propertyConstraint) { GetElement(child).Width = propertyConstraint; PerformLayout(this, "WidthConstraint"); }