Share via


BoundsConstraint.FromExpression Method

Definition

Returns a BoundsConstraint object that contains the compiled version of expression and is relative to either parents or the views referred to in expression.

public static Microsoft.Maui.Controls.BoundsConstraint FromExpression (System.Linq.Expressions.Expression<Func<Microsoft.Maui.Graphics.Rect>> expression, System.Collections.Generic.IEnumerable<Microsoft.Maui.Controls.View> parents = default);
static member FromExpression : System.Linq.Expressions.Expression<Func<Microsoft.Maui.Graphics.Rect>> * seq<Microsoft.Maui.Controls.View> -> Microsoft.Maui.Controls.BoundsConstraint
Public Shared Function FromExpression (expression As Expression(Of Func(Of Rect)), Optional parents As IEnumerable(Of View) = Nothing) As BoundsConstraint

Parameters

expression
Expression<Func<Rect>>

The expression from which to compile the constraint.

parents
IEnumerable<View>

The parents to consider when compiling the constraint.

Returns

Applies to