Skip to content

Instantly share code, notes, and snippets.

@prashantvc
Created January 21, 2016 10:02
Show Gist options
  • Save prashantvc/637fdeb7514409d80a85 to your computer and use it in GitHub Desktop.
Save prashantvc/637fdeb7514409d80a85 to your computer and use it in GitHub Desktop.
using Xamarin.Forms;
namespace FormsPlayground
{
public class App : Application
{
public App()
{
var password = new Entry()
{
IsPassword = true,
Text = "Password"
};
var button = new Button()
{
Text = "Click"
};
button.Clicked += (sender, args) =>
{
password.IsEnabled = !password.IsEnabled;
};
// The root page of your application
MainPage = new ContentPage
{
Content = new StackLayout
{
VerticalOptions = LayoutOptions.Center,
Children = {
password,
button
}
}
};
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment