C# Class Praeclarum.UI.Layout

Mostra file Open project: praeclarum/Praeclarum

Public Methods

Method Description
ConstrainLayout ( this view, Expression constraints ) : NSLayoutConstraint[]

Constrains the layout of subviews according to equations and inequalities specified in constraints. Issue multiple constraints per call using the && operator.

e.g. button.Frame.Left >= text.Frame.Right + 22 && button.Frame.Width == View.Frame.Width * 0.42f

ConstrainLayout ( this view, Expression constraints, UILayoutPriority priority ) : NSLayoutConstraint[]

Constrains the layout of subviews according to equations and inequalities specified in constraints. Issue multiple constraints per call using the && operator.

e.g. button.Frame.Left >= text.Frame.Right + 22 && button.Frame.Width == View.Frame.Width * 0.42f

GetBaseline ( this viewFrame ) : nfloat

The baseline of the view whose frame is viewFrame. Use only when defining constraints.

GetCenterX ( this viewFrame ) : nfloat

The x coordinate of the center of the frame.

GetCenterY ( this viewFrame ) : nfloat

The y coordinate of the center of the frame.

Private Methods

Method Description
CompileConstraint ( BinaryExpression expr, UIView constrainedView ) : NSLayoutConstraint
ConstantValue ( Expression expr ) : float
Eval ( Expression expr ) : object
FindConstraints ( Expression expr, List constraintExprs ) : void
GetRight ( Expression expr ) : Tuple
GetViewAndAttribute ( Expression expr ) : NSLayoutAttribute>.Tuple
IsConstant ( Expression expr ) : bool

Method Details

ConstrainLayout() public static method

Constrains the layout of subviews according to equations and inequalities specified in constraints. Issue multiple constraints per call using the && operator.

e.g. button.Frame.Left >= text.Frame.Right + 22 && button.Frame.Width == View.Frame.Width * 0.42f

public static ConstrainLayout ( this view, Expression constraints ) : NSLayoutConstraint[]
view this The superview laying out the referenced subviews.
constraints Expression Constraint equations and inequalities.
return NSLayoutConstraint[]

ConstrainLayout() public static method

Constrains the layout of subviews according to equations and inequalities specified in constraints. Issue multiple constraints per call using the && operator.

e.g. button.Frame.Left >= text.Frame.Right + 22 && button.Frame.Width == View.Frame.Width * 0.42f

public static ConstrainLayout ( this view, Expression constraints, UILayoutPriority priority ) : NSLayoutConstraint[]
view this The superview laying out the referenced subviews.
constraints Expression Constraint equations and inequalities.
priority UILayoutPriority The priority of the constraints
return NSLayoutConstraint[]

GetBaseline() public static method

The baseline of the view whose frame is viewFrame. Use only when defining constraints.
public static GetBaseline ( this viewFrame ) : nfloat
viewFrame this
return nfloat

GetCenterX() public static method

The x coordinate of the center of the frame.
public static GetCenterX ( this viewFrame ) : nfloat
viewFrame this
return nfloat

GetCenterY() public static method

The y coordinate of the center of the frame.
public static GetCenterY ( this viewFrame ) : nfloat
viewFrame this
return nfloat