Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Update RelativeLayout to make it respond to constraint changes #425
Description of Change
Constraints of a RelativeLayout are bindable properties but the layout does not update when the constraints are updated.
This change will invalidate the layout whenever XConstraint, YConstraint, WidthConstraint or HeightConstraint is changed (either in code or through a change in the bound property)
RelativeLayout will now invalidate itself when any of the constraint expressions on children change. Since constraints are bindable properties, this is the expected behavior.
In the exisiting implementation, it was impossible to update the constraints after the layout was created, even from code. The only way to change the layout was to update the BoundsConstraint property and call InvalidateLayout. Changing XConstraint, YConstraint, WidthConstraint or HeightConstraint had no effect.
Hi @activa, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.
This looks ok, even if it's probably expensive, but it requires a few unit tests
Thanks for the heads up, @activa.
I added some extra comments, could you please look at it ?
Also, the documentation needs to be updated, and the changes added to this PR. There are scripts to help you doing that at the root of the repository.
When this is done, don't hesitate to ping me, I'll get a second pair of eyes on this, and hopefully we'll get this merged.
yes, only the setters.
if you're using a mac,