Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 75885

Can animation LayoutTo work with RelativeLayout constraints to Views

$
0
0

I would like to animate the height of ViewA which constrains ViewB which constrains ViewC and see that ViewB and ViewC also update layout position according to their constraints. Pseuco Code:

        rellayout.Children.Add(ViewA, yConstraint: Constraint.Constant(0));

        rellayout.Children.Add(ViewB, yConstraint: Constraint.RelativeToView(ViewA, (p, v) =>
        {
            return v.Y + v.Height;
        }));

        rellayout.Children.Add(ViewC, yConstraint: Constraint.RelativeToView(ViewB, (p, v) =>
        {
            return v.Y + v.Height;
        }));

   ViewA.LayoutTo( ViewANewHeightRect,, duration, easing);

ViewB and ViewC don't update position. Is there an event I need to respond to and ForceLayout or something?
Do relative layout constraints continue to function after the initial layout?

I saw an example using RelativetoParent in the forum but this is relative to view... does that make a difference?

Thanks.


Viewing all articles
Browse latest Browse all 75885

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>