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);
}