Skip to content

Instantly share code, notes, and snippets.

@prashantvc
Created September 17, 2014 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prashantvc/aea65e40ebb77330d1db to your computer and use it in GitHub Desktop.
Save prashantvc/aea65e40ebb77330d1db to your computer and use it in GitHub Desktop.
using System;
using Xamarin.Forms;
using System.Diagnostics;
namespace AndroidAnimation
{
public class App
{
public static Page GetMainPage ()
{
return new MyPage ();
}
}
class MyPage: ContentPage
{
public MyPage ()
{
var link = new Label {
Text = "Hello",
};
var button = new Button {
Text = "Animate",
};
button.Clicked += async (sender, e) => {
try {
await link.ScaleTo (1.35, 350, Easing.SpringIn);
await link.ScaleTo (1, 350, Easing.SpringOut);
} catch (Exception ex) {
Debug.WriteLine (ex.ToString ());
}
};
Content = new StackLayout {
Children = { button, link },
};
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment