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

Animating HeightRequest extremely choppy

$
0
0

Is there a way to animate the Height of a VisualElement that is buttery smooth? I have the following that I thought would work, but it is extremely jerky:

void collapseExpandHeightAnimation(string name, VisualElement obj, double fromHeight, double toHeight, uint length)
{
    obj.Animate(
                name: name,
                animation: new Animation(
                    callback: (double d) => { obj.HeightRequest = d; },
                    start: fromHeight,
                    end: toHeight,
                    easing: Easing.SinInOut,
                    finished: null),
                rate: 1,
                length: length);
}

Viewing all articles
Browse latest Browse all 58056

Trending Articles