TimLariviere / Fabulous-new

Fabulous v2 - Work in progress
https://timothelariviere.com/Fabulous-new/
Other
41 stars 3 forks source link

RelativeLayout + Widget + Extensions #91

Closed edgarfgp closed 2 years ago

edgarfgp commented 2 years ago

This PR adds basic support to match v1 for RelativeLayout based on : https://docs.microsoft.com/en-us/dotnet/api/xamarin.forms.relativelayout?view=xamarin-forms

Not Implemented

internal static BoundsConstraint FromExpression(Expression<Func> expression, bool fromExpression, IEnumerable parents = null) { Func compiled = expression.Compile(); var result = new BoundsConstraint { _measureFunc = compiled, RelativeTo = parents ?? ExpressionSearch.Default.FindObjects(expression).ToArray(), // make sure we have our own copy CreatedFromExpression = fromExpression };

return result;

}



### We could consider using ViewRef to try to accomplish this maybe ? 
TimLariviere commented 2 years ago

For now, let's merge this PR. Given the non-trivial support of RelativeToView and BoundsConstraint, and the fact it was never supported by v1 and no one complained about it, let's keep it for when the need arise.