Created
September 17, 2014 03:50
-
-
Save prashantvc/aea65e40ebb77330d1db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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