Skip to content

Instantly share code, notes, and snippets.

@adamped
Created April 10, 2016 07:08
Show Gist options
  • Save adamped/f939c94c75f9efa407eb34e29ed6ba58 to your computer and use it in GitHub Desktop.
Save adamped/f939c94c75f9efa407eb34e29ed6ba58 to your computer and use it in GitHub Desktop.
var animation = new Animation(callback: d => grid.StatusBar.WidthRequest = d,
start: 0,
end: grid.Width,
easing: Easing.Linear);
animation.Commit(grid, MoveAnimation, rate: Convert.ToUInt32(jumpCount), length: Convert.ToUInt32(Timeout), finished: (length, result) =>
{
if (IsRunning)
{
grid.StatusBar.BackgroundColor = Color.Red;
var anim = new Animation(callback: d => grid.StatusBar.Opacity = d, start: 1, end: 0, easing: Easing.Linear);
anim.Commit(grid, ErrorFadeAnimation, rate: 10, length: 3000, finished: (l, r) => { grid.StatusBar.IsVisible = false; });
}
IsRunning = false;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment